0
why does declaration of Sacnner ABC=new Scanner(); shows error in Java eclipse.?
2 Antworten
+ 1
Pass in "System.in"
Into the contructor of the class Scanner e.g
Scanner s = new Scanner(System.in);
0
you need an InputStream, a String, a File, a Readable, ... as an argument for the Scanner konstruktor.
For example System.in.
https://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html