How do you stop scanner from overloading? (Java)
In my Code, if you enter a large number like 10000000000000000000, it gives an error and ends the program.
Is there any way to fix this?
Exception in thread "main" java.util.InputMismatchException: For input string: "10000000000000000000" at java.util.Scanner.nextInt(Scanner.java:2123) at java.util.Scanner.nextInt(Scanner.java:2076) at Main.main(Main.java:17) exit status 1
You are viewing a single comment. View All
Answered by malvoliothegood (428) [earned 5 cycles]