Why doesn't the Scanner class have a nextChar method?
This is really a curiosity more than a problem...
Why doesn't the Scanner class have a nextChar() method? It seems like it
should when you consider the fact that it has next, nextInt, nextLine etc
method.
I realize you can simply do the following:
userChar = in.next().charAt(0);
System.out.println( userChar );
But why not have a nextChar() method?
No comments:
Post a Comment