java receive input from console code example
Example 1: java text ouput to console
System.out.println("Hello world!");
//This will be printed out to the console and requires no imports.
Example 2: java taking console input
String str = System.console().readLine();