Read standard input (stdin) with in Java

In JDK 1.6, reading standard input (stdin) changed to a simple approach using

readLine takes input from which is a handle to which uses the InputStream class.

System.out.println("Enter text:");
// Note: console.readLine returns null when used from an IDE
String input = System.console().readLine();

Using Scanner is a friendly approach when using an IDE.