How do I split text by "," and get rid of the "," in java?
<p>I want to split and get rid of the comma's in a string like this that are entered into a textfield:</p>

<p>1,2,3,4,5,6</p>

<p>and then display them in a different textfield like this:</p>

<p>123456</p>

<p>here is what i have tried.</p>

<pre><code>   String text = jTextField1.getText();

    String[] tokens = text.split(",");
    jTextField3.setText(tokens.toString());
</code></pre>
