初始化器

Student stu1 = new Student();
Student stu2 = new Student();
Student stu3 = new Student();

ArrayList arrayList = new ArrayList() {
  stu1, stu2, stu3,
};
posted @ 2022-11-15 11:26  IT_IOS_MAN  阅读(17)  评论(0编辑  收藏  举报