I have an array list with values such as
{ "november", "a","b","c","d", "december", "i","j","k", "april", "g","h" }
What is the best way to split it so i can have different arrays based on months.for example
List<String> novemberArray={"a","b","c","d"}
and
List<String> decemberArray={"i","j","k"}`
etc..
I am getting this list from parsing an html page with Jsoup.
Elements tableRowElements = tableElements.select(":not(thead) tr");
for (int i = 0; i < tableRowElements.size(); i++) {
Element row = tableRowElements.get(i);
System.out.println("row : " );
Elements rowItems = row.select("tr");
for (int j = 1; j < rowItems.size(); j++) {
System.out.println(rowItems.get(j).text());
myList.add(rowItems.get(j).text());
}
}
myList has the values of { "november", "a","b","c","d", "december", "i","j","k", "april", "g","h" }
List is dynamic and i dont have any control on the positions in the list. Using sub indexes will not help because they change frequently.