scJohn
asked on
compile error
hello, im getting a error and dont understand what it means. It says missing return statement, any ideas.
this is the code that i get the error on:
//Method: getFinalExam
private static int getFinalExam() throws IOException
{
int iReturn = -1;
System.out.println("The Final exam is worth 100 total points");
System.out.println("Please enter your fianl exam grade.");
boolean bDone = false;
while (!bDone)
{
int finalExam = Integer.parseInt(Keyboard. readLine() );
if ((finalExam >= 0) && (finalExam <= 100))
{
bDone = true;
iReturn = finalExam;
}
else
{
System.out.println("Enter a score from 1 - 100");
}
return iReturn;
}
}
this is the code that i get the error on:
//Method: getFinalExam
private static int getFinalExam() throws IOException
{
int iReturn = -1;
System.out.println("The Final exam is worth 100 total points");
System.out.println("Please
boolean bDone = false;
while (!bDone)
{
int finalExam = Integer.parseInt(Keyboard.
if ((finalExam >= 0) && (finalExam <= 100))
{
bDone = true;
iReturn = finalExam;
}
else
{
System.out.println("Enter a score from 1 - 100");
}
return iReturn;
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:-)