+ 2

" Scanner(System.in).nextInt(); " why this Scanner is not working in sololearn.Could you explain me please. Thanks beforehand

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

6th Dec 2021, 6:11 AM
Ordinary
Ordinary - avatar
2 Answers
+ 4
The scanner is the part of Java utility class. You need to import that first. add this at the top. import java.util.Scanner;
6th Dec 2021, 6:21 AM
zexu knub
zexu knub - avatar
+ 1
Thanks
6th Dec 2021, 6:50 AM
Ordinary
Ordinary - avatar