Tuesday, July 28, 2020

Console Input

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

Racing Thoughts

 There are times where I cannot help the thoughts that come into my mind. They're racing and I feel like I don't have any control ov...