ArrrayList list; class Student{……} Student s; s=(Student)lis

yl_19442022-10-04 11:39:542条回答

ArrrayList list; class Student{……} Student s; s=(Student)list[i];最后一句是什么意思

已提交,审核后显示!提交回复

共2条回复
起源1 共回答了17个问题 | 采纳率88.2%
s=(Student)list[i];
是指 list 集合里存的 是 n 个 Student 对象,取出 第 i 个对象 Object,要将它强制转换为:Student类型.
s=(Student)list[i]; 这句应该是放在循环体里操作的吧.
1年前
zjln3 共回答了32个问题 | 采纳率
这不是英语题吧。属于计算机Java的吧。
list是个引用。
List list = Collections.synchronizedList(new ArrayList(...));
1年前

相关推荐