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

A Placebo?

 At times I wonder if my medication is just a placebo. That is a medication that usually has no effect on a disease. Am I dreaming it all up...