Monica Vedham wrote:Exception in thread "main" java.util.InputMismatchException
at java.util.Scanner.throwFor(Scanner.java:909)
at java.util.Scanner.next(Scanner.java:1530)
at java.util.Scanner.nextDouble(Scanner.java:2456)
at Main.main(Main.java:63)
Dave, zoom browser up to 110%, this is what I do sometimes, when having problems like you do.Dave Tolls wrote:Not sure which line is line 63..
'John Smith' shouldn't cause that kind of issue. It just would make him become 'John'.Dave Tolls wrote:...what name is being entered?
Dave Tolls wrote:
Not sure which line is line 63 that is causing the issue, but if it is around here then what name is being entered?
Can you show the output from the app (not just the stack trace)?
I ask because if the name is something like 'John Smith' then Scanner's next() method doesn't do what you expect.
Liutauras Vilda wrote:
'John Smith' shouldn't cause that kind of issue. It just would make him become 'John'.Dave Tolls wrote:...what name is being entered?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |