Scanner
suggest changeVersions
The Scanner class has been part of Java SE since 5.
Syntax
- Scanner scanner = new Scanner(Source source);
- Scanner scanner = new Scanner(System.in);
Parameters
| Parameter | Details |
|---|---|
| Source | A String, a File, or an InputStream |
Remarks
The Scanner class was introduced in Java 5. The reset() method was added in Java 6, and a couple of new constructors were added in Java 7 for interoperability with the (then) new Path interface.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents