Hi, I am getting an compiler error for this method below "This method must return a result of the type int" to my mind it does return an int; it takes the next int entered and if it is valid returns it? But obviously I have made an error.
public int score() { System.out.println("Enter score"); score= sc.nextInt(); while (score < 0 || score > 100) { System.out.println("Invalid number !"); System.out.println ("Enter an average in range 0 to 100"); score=sc.nextInt(); return score; } }