I have the following:
[[Statistics (pH)], [ Upright Normal Recumbent Normal Total]]
I want to split the first element of the second element on whitespace so that I end up with:
[[Statistics (pH)], [Upright,Normal,Recumbent,Normal,Total]]
My code so far:
for (ArrayList<List<String>> row2 : StatspH) {
row2.get(1).get(0).split("\\s");
}
but nothing happens
row2.get(1).get(0).split("\\s")splits the string, but you are discarding the returnedString[].split()will return a new instance of String[].