0

Why it i giving error in this simple code?

https://code.sololearn.com/cx9ptTI09z1N/?ref=app

27th May 2020, 8:51 AM
Harsh Vyas
Harsh Vyas - avatar
2 Antworten
+ 2
Change last line with this System.out.println("the value of i is " + code.nextInt()); or do like this i = code.nextInt(); System.out.println("the value of i is " + i); nextInt is a method so you should write nextInt()
27th May 2020, 8:54 AM
A͢J
A͢J - avatar
+ 1
Thank you
27th May 2020, 9:09 AM
Harsh Vyas
Harsh Vyas - avatar