+ 4
Java scanner input help
im progressing through learning java and you cant learn real world experience without experimenting but i cant seem to work out where this code is going wrong https://code.sololearn.com/cCFolm34Xr7a/?ref=app
9 Answers
+ 12
@Swan use like this
int age = sc.nextInt();
I is in upper case in nextInt();
+ 18
int age = new Scanner(System.in).nextInt();
//for reducing 1 line āŗš
+ 3
In line 5 you've to replace sc.Nextint() with sc.nextInt(). Java is casesensitive.
+ 3
i still get cannot find symbol indicating to the fullstop
+ 2
thankyou it was a combination of both incorrect upper/lower case
+ 2
sorry ive been updating and saving the code with each suggestion should i comment in the original lines so it helps other people with the same issue i had
+ 1
what do you mean with fullstop?
+ 1
yes :) , It would help others who are learning to understand it.
0
It seems ok to me :)