✏️ Explanatory Question

What is the role of the StringTokenizer class, and what are its two primary methods for processing strings?

👁 1 Views
📘 Detailed Answer
🟢 Easy
1
Total Views
10
Related Qs
0%
Progress
💡

Answer with Explanation

 The StringTokenizer class, found in the java.util package, is used to break a string into smaller parts called tokens based on a set of delimiters. Its two primary methods are countTokens(), which returns the number of tokens in the string, and nextToken(), which returns the next token from the string in sequence.