aspose file tools*
The moose likes Java in General and the fly likes difference between using tokenizing, split Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "difference between using tokenizing, split " Watch "difference between using tokenizing, split " New topic
Author

difference between using tokenizing, split

avishek bose
Greenhorn

Joined: Oct 12, 2011
Posts: 15
hi ,

Ca anyone tell me the difference between the tokenzer and split() applied to string and when to use them

regards
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8231
    
  23

avishek bose wrote:Ca anyone tell me the difference between the tokenzer and split() applied to string and when to use them

This from the StringTokenizer class API documentation:
"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."

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
Don't get me started about those stupid light bulbs.
 
subject: difference between using tokenizing, split