StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code. It is recommended that anyone seeking this functionality use the split method of String or the java.util.regex package instead.

if we compare stringtokenizer and the split method of java.util.regex on stability issues.. can anyone elaborate on this one?

Regular expressions were already here in the 70s of the last century; it's a very stable and matured technology. There are a few steps to implement: from Regular Expressions to NFAs (Non-deterministic Finit Automata) and (optionally) from NFA to DFA (Determinstic Finit Automata). There's nothing mysterious or rocket science about it; if Sun/Oracle managed to do it wrong I give them a funny face because they're amateurs then.

actually i am new to java.. thats why i joined this forum to learn more much from you guys. thanks alot..

There's nothing wrong with being new to whatever; please always read the API documentation for the classes and/or methods you want to use. There's a lot of information in there. a.a.m.o.f. bookmark it together with Sun's/Oracle's tutorials, they are both a must read.

There's nothing wrong with being new to whatever; please always read the API documentation for the classes and/or methods you want to use. There's a lot of information in there. a.a.m.o.f. bookmark it together with Sun's/Oracle's tutorials, they are both a must read.

Yup, and please try not to mislead other newbies by making pronouncements on what's best when you're not sure yourself.