Home / Questions / What key capability did the Scanner class introduce in J2SE 5.0 for obtaining input?
Explanatory Question

What key capability did the Scanner class introduce in J2SE 5.0 for obtaining input?

👁 2 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

 The Scanner class provides a powerful way to parse text for primitive types and strings using regular expressions. It can obtain input from any source that implements the Readable interface, such as an InputStreamFile, or a String object, and can split the input into tokens based on delimiters, which are whitespace by default.