+ 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

17th May 2020, 6:58 AM
Dilip Adithya
Dilip Adithya - avatar
8 Réponses
17th May 2020, 7:37 AM
Abhay
Abhay - avatar
+ 2
Or in 1 line int age = new Scanner(System.in).nextInt();
17th May 2020, 7:48 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
How to do that ?
17th May 2020, 7:16 AM
Dilip Adithya
Dilip Adithya - avatar
+ 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.
17th May 2020, 7:22 AM
Brian R
Brian R - avatar
+ 1
Thanks to everyone who helped me
17th May 2020, 7:49 AM
Dilip Adithya
Dilip Adithya - avatar
+ 1
Dilip thnks
17th May 2020, 7:49 AM
Abhay
Abhay - avatar