how to take in console input with java code example Example: java taking console input String str = System.console().readLine();