java - Storing values in simple array map -
i have 2 loops, in first for loop have headings , in second loop have items related headings. problem storing heading items in simple array map.
ex:
heading1 = {item1,item2,item3, , on}heading2 = {item8,item10,and on}
how achieve type of storage in simple array map.
(int k = 0; k < checklistmainitems.size(); k++) { mainsub = checklistmainitems.get(k).getmainitemdescription().tostring(); (int j = 0; j < checklistsubitems.size(); j++) { subitemtexts.add(checklistsubitems.get(j).getsubitemdescription().tostring();} } }
you can use hashmap key type can have string , value arraylist of strings.
but if want use arrays can use string map[][] = new string[checklistmainitems.size()][]; inside second loop can put values in map[k][j]
Comments
Post a Comment