What is difference between string and stringtokenizer?

Questions by tulasi   answers by tulasi

Showing Answers 1 - 4 of 4 Answers

Mujeeb

  • Oct 31st, 2005
 

Obviously StringTokenizer as it is suggested by its name tokenizes a String supplied to it as an argument to its constructor and the character based on which tokens of that string are to be made.The default tokenizing character is space " ".

  Was this answer useful?  Yes

mandyjoshi

  • Nov 11th, 2005
 

A StringTokenizer is utility class used to break up string.

e.g.

StringTokenizer st = new StringTokenizer("Hello World");
     while (st.hasMoreTokens()) {
         System.out.println(st.nextToken());
     }

Output:

Hello

World

  Was this answer useful?  Yes

katam

  • Nov 14th, 2005
 

stringtokeniser can devide the the string into tokens.where string is

group of characters within " ">

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions