Scanner in Java
There are various ways to read input from the keyboard, the java.util.Scanner class is one of them.
The Java Scanner class breaks the input into tokens using a delimiter that is whitespace bydefault. It provides many methods to read and parse various primitive values.
Java Scanner class is widely used to parse text for string and primitive types using regular expression.
Java Scanner class extends Object class and implements Iterator and Closeable interfaces.
0 comments:
Post a Comment