java read input from keyboard advanced code example Example: java taking console input String str = System.console().readLine();