try(Scanner scan=new Scanner(System.in)){// In java, read from consoleString inputString=scan.nextLine();//In Java, write to consoleSystem.out.println(inputString);}
try(Scanner scan=new Scanner(System.in)){
// In java, read from console
String inputString=scan.nextLine();
//In Java, write to console
System.out.println(inputString);
}