This java tutorial focuses on the usage of the Scanner class of java.util package. We will be showing the basic usage of Scanner class until the most advanced features of this class using examples. As we move along on this document, we will be showing java scanner examples more importantly on the usage of Scanner methods.

The Scanner class has a rich set of API which generally used to break down the input to Scanner constructor into tokens. It can parse the tokens into primitive data types using java regular expressions. The input is broke down into tokens using the delimiter defined on the Scanner class using the radix method or can be define as well as method argument on some of the methods available on this scanner class.

Scanner Class Declaration

public final class Scanner
extends Object
implements Iterator, Closeable

Scanner Class Constructors