Link to home
Start Free TrialLog in
Avatar of scJohn
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;
            }

      }
ASKER CERTIFIED SOLUTION
Avatar of OBCT
OBCT

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of OBCT
OBCT

:-)