Multiple choice

What does nextElement() method return in StringTokenizer class?

  1. It returns the next token as a String.

  2. It returns the next token as an Object.

  3. It returns the number of tokens left to be parsed.

  4. It returns true if one or more tokens remain in the string.

  5. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is task of nextElement() in StringTokenizer class.