This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a String in which there are 5 tokens taht are delimited by tabs ("\t"). I was using the StringTokenizer to parse this line and get individual tokens. It worked fine, till I encountered a situation where there were 2 tabs (instead of 1). Now, since StringTokenizer doesn't return me an empty string, how can I find out if there is a consecutive occurrence of that token. I know that the 3rd constructor of String Tokenizer has a boolean argument that can be set true, but it doesn't seem to be doing good to me!!
"Swats", I'm going to take a stronger stance than Barry.
Looking back through your history, it appears that you have changed your display name and it is now invalid. We rarely allow accounts with invalid display names to survive past 20 posts. Please change your display name immediately, or your account may be deleted without warning.
Joined: Dec 08, 2003
Even split() doesn't give me an empty string"" or a null if there are two tabs in succession. What I want is, that if there are 2 consecutive tabs, then it should be able to detect that and give me an empty String or null which occurs between the two consecutive tabs.