I'm creating an application that is supposed to read text from mySql database using a get method.
Once it gets data elements from the database as string, it's supposed to split the string and create a list using the string however the split() method does not seem to work here.
J2ME says cannot find method split()
- what should I do?
My code is below:
/* assuming the string (String dataString) has already
been read from the database and equals one,two three
i.e String dataString = "one,two,three"; */
String dataArray[];
String delimiter = ",";
dataArray = dataString.split(delimiter);
//continue and create a list from the array.
I've tried this on a desktop and console application and seems to work perfectly, but code does not run in a j2me application. Is there a method that I'm supposed to use? What can I do?