集合对象存放的是一系列对象的引用。

 

添加知识点:

集合对象存放的是一系列对象的引用。

例:

Student S

Al.add(s);

s.setName(“lucy”);

Student s2=(Student)(al.get(o1));

可知s2也是s

猜你喜欢

转载自www.cnblogs.com/borter/p/10744057.html
今日推荐