I'm writing this simple program where StringTokenizer takes the string and gives me the result with seperator(which is , in my case). Heres the code:
but when i run my code, Im getting ballot04,expo as my output. I want to get ballot04 expo I thought StringTokenizer removes/ignores the seperator and gives the result??. Is there something im doing wrong???. THanks for your help
posted 11 years ago
You need to construct your StringTokenizer with the delimeter as it defaults to the space character. Something like:
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.