+ 4
What is the statement to accept an input from user in java
for eg. to accept a value for int x;
2 odpowiedzi
+ 5
See readInput() method in
https://code.sololearn.com/cAfnLE0W37f4/?ref=app
Instead of nextLine use nextInt and assign the return value to an int.
0
try import java.util.scanner;
scanner name=new scanner(system.in);