Hello,
My code is as follows:
private static ArrayList<String[]> file;
...
void method()
{
file = new ArrayList<String[]>();
...
String[] s = str.split(";");
file.add(s);
}
In the above, str
is a long String that is seperated by semicolons.
My problem is that I want to go through each array in the ArrayList
and get one element from each array.
So for example if one array was "hello; are; today"
and another was "how; you;"
then I want to retrieve it as "hello how are you today"
(ie. one element from each array).
I can't think of a way to do this.
Any help will be much appreciated.
Thanks in advance.