The Scanner class is the basis for the logic implemented in the String next(Pattern) method. An additional API method, for example nextDouble() or nextFloat() . Provide a template inside.
Then the class description says :
A simple text scanner that can parse primitive types and strings using regular expressions.
The scanner splits its input into tokens using the delimiter pattern, which by default matches a space. As a result, tokens can be converted to values ββof different types using the various following Methods.
From the description, it may be sad that someone forgot about char, since it is a primitive type.
But the concept of a class is to find patterns, char doesn't have a pattern, it's just the next character. And this logic IMHO caused the fact that nextChar was not implemented.
If you need to read char file on char, you can use a more efficient class.
Damian LeszczyΕski - Vash Sep 11 '13 at 16:22 2013-09-11 16:22
source share