I have created a new Codenameone project. It contains the following code:
String values = \"one, two, tree\";
String[] v = values.split(\",\");
>
Why don't you try this?
import java.util.StringTokenizer;
... ...
String fruits = "apple:pear:grape";
String delimiter = ":";
StringTokenizer fruitsTokenizer = new StringTokenizer(fruits, delimiter);
while (fruitsTokenizer.hasMoreTokens()) {
String fruit = fruitsTokenizer.nextToken();
//
// Do here something you want...
//
}