There are times you wish to gather input from the console. There are a few ways of doing this. Here is one way of getting input from the user via the console:
public class Test {
public static void main(String[] args) {
String in;
in = System.console().readLine();
System.out.println(in);
}
}
No comments:
Post a Comment