Exception in thread "main" java.util.InputMismatchException

Exception in thread "main" java.util.InputMismatchException

at java.util.Scanner.throwFor(Scanner.java:818)
at java.util.Scanner.next(Scanner.java:1420)
at java.util.Scanner.nextDouble(Scanner.java:2324)
at FutureValueApp.main(FutureValueApp.java:17)
What caused the exception to occur?



a. You can't tell from the information given.
b. The user didn't enter the type of data the program was expecting.
c. The program couldn't format the double value that the user entered.


Answer: b. The user didn't enter the type of data the program was expecting.


Learn More :