I have a text file, I use this code to split and process this content:
String[] array = s.split(",");
How I can get size of this array?
The text file filling dynamic, and I don't know size of the items.
I can get the size of ArrayList<string>
, but this object is unuseable here.
public ArrayList<String> myList = new ArrayList<String>();
myList =s.split(",");//error:cannot convert from String[] to ArrayList<String>