| Author |
delimiters in StringTokenizer
|
AJ sisodia
Greenhorn
Joined: Jan 19, 2005
Posts: 16
|
|
|
could u explain delimiters in simple Language.
|
 |
Hilton Meyer
Greenhorn
Joined: Nov 13, 2003
Posts: 17
|
|
As I can understand the delimiters used by StringTokenizer there is the default delimiters which are whitespace characters(blank,new line or any other separators that are whitespace if you sere to print them on paper) and this is set up with something like: If you wanted to specify which each separator is you would need to use the constructor where you can specify the delimiters or separators that you can make up: This part in inverted comma's: " \n%." are your specified delimiters. the first is a space followed by \n which is new line then % and . These are all your own separators and you can use basically any symbol as a separator or delimiter as long as you specify it when initialising the variable(in this case sentence) Hope this helps but if you need something's unclear give me a shout because it has helped me a bit better in understanding the StringTokeniser Class. [ January 25, 2006: Message edited by: Hilton Meyer ] [ January 25, 2006: Message edited by: Hilton Meyer ]
|
Keep it Tidy
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
In simple language, is what separates one thing from another thing. 1,2,3,4,5 Comma is the delimiter of this list of numbers. With StringTokenizer, you could grab each of those numbers by specifying that their delimiter is a comma.
|
[My Blog]
All roads lead to JavaRanch
|
 |
 |
|
|
subject: delimiters in StringTokenizer
|
|
|