Wrong. The parseInt() method converts a String to an int.
Read the String class's API doc for methods to convert an int to a String.
With Java 1.7 switch statements will work with Strings.
Type: Posts; User: Norm
Wrong. The parseInt() method converts a String to an int.
Read the String class's API doc for methods to convert an int to a String.
With Java 1.7 switch statements will work with Strings.
The call to nextInt() at line 21 is trying to read an int value from the keyboard but the user is entering something that is not a numeric value. Use the next() or nextLine() method if you want to...
Can you explain what the problem is?
The message printed for the default: should include the invalid option's value.