0

Why isn't User Input working in any of my programs?

I wrote the 3 steps: 1- To import java.util.Scanner; 2- Write Scanner sc= new Scanner(system.in); 3- And declare for example " sc.nextInt" for an Integer data type. But it ever shows error in the 1st step. https://code.sololearn.com/cLJL6iQIQ8Pn/?ref=app

18th May 2020, 1:17 PM
Kashish
Kashish - avatar
5 Respostas
+ 4
1. missing a ; after import 2. import first, then class https://code.sololearn.com/cnMV80D8lRT7/?ref=app
18th May 2020, 1:30 PM
Gordon
Gordon - avatar
+ 2
Is your code in SoloLearn code playground? Please show your code here in this way so that we can help you https://www.sololearn.com/post/75089/?ref=app
18th May 2020, 1:21 PM
Gordon
Gordon - avatar
+ 1
Make a template for new code. Keep up.
18th May 2020, 1:43 PM
Gordon
Gordon - avatar
0
Ok , so I added it
18th May 2020, 1:26 PM
Kashish
Kashish - avatar
0
Hey, Thanks a lot, it helped. Made the same mistake in mostly all of such projects.
18th May 2020, 1:40 PM
Kashish
Kashish - avatar