+ 1
PLEASE HELP ME
i created a java code called "PLEASE HELP ME ".it is not working.so please me.comment on it about how to fix it.anything helps https://code.sololearn.com/c5Q2o193CvAf/?ref=app
8 Réponses
+ 2
Or in 1 line
int age = new Scanner(System.in).nextInt();
+ 1
How to do that ?
+ 1
You need to get the input from the scanner into a variable so you can use it.
Try changing the name of the scanner to 'scanner' and creating an integer variable called age. You can get the integer from the scanner using the `scanner.nextInt()` method.
+ 1
Thanks to everyone who helped me
+ 1
Dilip thnks