Harkishin Nachnani wrote:
>
> I have a string : "1,2,,4"
> I am using String Tokenizer class with the delimiter ","
> I should get 4 strings : "1"    "2"    " "   "4"
You probably would get this when you have "1,2, ,4" but probably not
with "1,2,,4" since there is no token to return.
> The 3rd String should be an empty string. But the String Tokenizer class
> gives me only 3 strings without the empty string.
That's because nextElement should return null in the case of ,,


sven


--
======================================================================================
Sven van 't Veer                                              http://www.cachoeiro.net
Java Developer                                                      [EMAIL PROTECTED]
                                        _/_
The answer                             /   \
    to the ultimate question        nnn|.
.|nnn                                     42
=========================================U============================================

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to