How do I read user input from console using Scanner class?


In JDK 1.5 a java.util.Scanner class was introduce to handle user input in console application. This class enable us to read string, integer, long, etc in the console application.

Filed in: Java Util Package
© 2014 Java Examples - Built with love by Wayan Saryada.