I need to check whether the entered numbers are valid, if not output a message. this needs to be done with using exception handles. i have tried the following but does not work. i get the error : cannot invoke hasNextInt() on the primitive type int
input = in.nextInt();
if (input > 0 || input > 8 || input.hasNextInt())
{
System.out.print("Enter Option");
}
else
{
System.out.println();
System.out.println("ERROR Bad data entry");
System.out.println();
} // end else
} while (input !=7);