0
trying to understand users input, using scanner method
public class Main { piblic static void main(String[] args) { Scanner str = new Scanner(System.in); System.out.println(Str.nextLine()); } } well, I wanted java to get my input and output in on the screen. wrote this and got this error ./Playground/Main.java:5: error: <identifier> expected piblic static void main(String[] args) { ^ 1 error any ideas? thanks in advance!
1 ответ
+ 2
Typos
`piblic` should be `public`.
`Str.nextLine` should be `str.nextLine`.
Also import Scanner class.
Comapare it with examples in course and you'll understand it.