help me fix this method pls!!

i keep getting this error : return statement missing, this is the method:

public static int readInteger( String text, int start, int end ) {

// Body of method readInteger

boolean num = true;

while ( !num ) {

System.out.print( text );

String s;

s = Stdin.readln();

if (isInteger(s)) {

int input = Integer.parseInt(s);

if ( start > end ) {

} else if ( input >= start && input <= end ) {

return input;

}

}

[513 byte] By [popeyea] at [2007-10-2 4:38:47]
# 1
Your return statement is inside a conditional which is also inside a loop. How is the compiler to know that it is guaranteed to hit that return statement before it gets out of the loop?That's the basics of the problem.
warnerjaa at 2007-7-16 0:11:53 > top of Java-index,Java Essentials,Java Programming...
# 2

boolean num = true;

while ( !num ) {

...

}

also..your loop is never excuted..because the expressin is evaluated out to be

while (false){

}

tnguyen1973a at 2007-7-16 0:11:53 > top of Java-index,Java Essentials,Java Programming...
# 3
Also, please format your source using "code" tags when posting. Questions like this are better asked in the New To Java Programming forum.Welcome to the boards!
bckrispia at 2007-7-16 0:11:53 > top of Java-index,Java Essentials,Java Programming...