+ 1
Is it possible to take input in Java without importing/using any packages like util and io?
5 Respostas
+ 1
Yes you can do that by using the fully qualified name within the main method.
java.util.Scanner sc = new java.util.Scanner(System.in);
String name = sc.nextLine();
+ 1
use command line arguments input
0
Scanner class is a part of util package,isn't it?😢 Avinesh I wanted to know if it is possible to take input without using any common methods... like Scanner Class and BufferedReader.
0
You said to do it without importing any packages. Do you see any import statement? I just answered what was asked, isn't it Kaustav Saha ?
0
zemiak thanks