Scanner class in java has some methods to take different datatypes.
Like nextInt for int
Next for string
NextLine for whole line
If you use nextInt first and then nextLine the nextLine wont work .
3/25/2019 5:28:41 PM
Use nextLine twice, the first one will consume new line after nextInt and second right user input
Michal why does it have to be like that?
Send us a message