0
used a scanner, input works for the string name, int age, numberYear, and booThang, after that its states an error exception
hello, can someone please take a look at my code and help me figure out why its not working? can you //comment my errors and necessary changes. Thank you https://code.sololearn.com/cEpAwnfd9zL8/#java
2 ответов
+ 3
Hello Pierre
Your code works fine. But the input on sololearn is a bit tricky.
Because you have to enter all values at the beginning.
In this order:
name [enter]
numberYear [space] location[enter]
booThang [enter]
dateYear [space] v1 [enter]
v2 [enter]
v3 [click on submit]
+ 1
Complement:
Every user input with next() (nextInt(), nextDouble() and so on) is space separated.
Only when you use nextLine() you need to jump on the next line, because nextLine() takes the whole line.