This class is found in the java.util package. There are various ways to read input from the keyboard, the java.util.Scanner class is one of them. This works by breaking the input into tokens using a delimiter which is whitespace by default. Many methods are provided to read and parse various primitive values. It is widely used to parse text for strings and primitive types using a regular expression. It is the easiest way to get input in Java.
public final class Scanner extends Object implements Iterator
Enter username (Knowledge2life)
Name is: Knowledge2life
|