get a inout and print in console 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()