该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
public static void guanli(int i, String b1) {
List list1 = new ArrayList();
List list2 = new ArrayList();
List list3 = new ArrayList();
switch (i) {
case 1: {
System.out.println("两栖动物馆新增一个动物:" + b1);
// 实例一个海洋动物类,并调用方法
hanimal e = new hanimal();
// animallist e1 = new animallist();
list1.add(b1);
e.count(list1.size());
e.shux();
}
break;
case 2: {
System.out.println("哺乳动物馆新增一个动物:" + b1);
// 实例一个哺乳动物类并调用方法
banimal e = new banimal();
// animallist e1 = new animallist();
list2.add(b1);
e.count(list2.size());
e.shux();
}
break;
case 3: {
System.out.println("海洋动物馆新增一个动物:" + b1);
// 实例一个两栖动物并调用方法
lanimal e = new lanimal();
// animallist e1 = new animallist();
list3.add(b1);
e.count(list3.size());
e.shux();
}
break;
default:
System.out.println("输入有误");
}
}
}
这个一个类 其中的 list1,list2,list3,楼主在另一个类中用的到!