package com.soar.list;
import java.util.ArrayList;
import com.soar.bean.Person;
public class Demo5_ArrayList {
public static void main(String[] args) {
ArrayList<ArrayList<Person>> list = new ArrayList<>();
ArrayList<Person> first = new ArrayList<>();
first.add(new Person("张三",23));
first.add(new Person("李四",24));
first.add(new Person("王五",25));
ArrayList<Person> second = new ArrayList<>();
second.add(new Person("黄晓明",31));
second.add(new Person("赵薇",32));
second.add(new Person("陈坤",39));
list.add(first);
list.add(second);
for(ArrayList<Person> a :list){
for(Person p : a){
System.out.println(p);
}
}
}
}