java - Access inner arraylist -
i have arraylist of arraylist following:
[[a,10],[b,20],[c,30]] how access inner arraylist's elements? suppose want print c. how print that?
thanks in advance.
you have list built other lists. can straight acces element @ specific index list.get(int) method:
list<list<string>> list = new arraylist<list<string>>(); list.get(2).get(0); or iterate on list:
for(list<string> innerlist : list){ } java arraylist
No comments:
Post a Comment