Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Core%20Java%20Interview%20Questions%20and%20Answers

Question: What is difference between String and StringTokenizer?
Answer: A StringTokenizer is utility class used to break up string. Example:
StringTokenizer st = new StringTokenizer("Hello World");
while (st.hasMoreTokens()) {
	System.out.println(st.nextToken());
}
Output:
Hello
World
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook