StringTokenizer not working
<p>I have a string as </p>

<p><code>str=123|apple|apple|apple|dog$</code></p>

<p>i like to seperate string using "|" character.</p>

<pre><code>    String str = "123|apple|apple|apple|dog$";
    StringTokenizer strString = new StringTokenizer(str..nextToken(), "|");
    int i;
    while (strString.hasMoreElements()) {
        if (i == 0)
            str1 = Loginstring.nextToken();
        else if (i == 1)
            str2 = Integer.Loginstring.nextToken();
        else if (i == 2) {
            str3 = Loginstring.nextToken();
            break;
        }
        i = i + 1;
    }
</code></pre>

<p>but it exit on first loop onwards(that means it exit from loop if i more than 1),, really i dont know y its happens, whats wrong with it</p>
