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

We Live In A Simulation

 You read that title right. We live in a simulation. Nothing is real. It's as real as you want it to be. But that doesn't mean it...