how to read from the console in java code example
Example 1: java taking console input
String str = System.console().readLine();
Example 2: read input from console
variable = input()
String str = System.console().readLine();
variable = input()