I have to split a line that has been stored in a String[], and then place the parts in an ArrayList.
Currently I am doing the following:
(vehicles is the origional String[],
details is the String, detail_split is the ArrayList)
for (int y = 0; y < vehicles.size(); y++) {
details = (String)vehicles.get(y);
detail_split = (ArrayList)details.split("$$", -1);
When I try the above code, Eclipse says:"Cannot cast from String[] to ArrayList"
What am I doing wrong?
Is there a better way for me to do it?