Is there a way to obtain the number of token in a string obtained by Method Scanner in Java?
I mean, i can use s = sc.nextLine()
to obtain an input line as a string. But on this string I cannot use lenght()
method cause it gives me the total number of characters (I think).
Are existing any standard methods to obtain the number of token? Thanks in advance