I've got a string with many lines and in each line contains a number of elements. I'm only after a third element of each line. Is there anything from with this chunk of code?
String[] separate = getArray().split("\n");
for (int i = 0; i < separate.length; i++)
{
String[] inner = separate[i].split("/");
for (int y = 0; y < inner.length; y++)
{
_listArray.add(String.valueOf(inner[2]));
}
}
it's not doing what it's supposed to, or maybe I'm just too tired.
String.valueOf( )
?inner[2]
is already aString
– Mel Nicholson Apr 16 '13 at 18:41