1、对象数组中存放是:
对象的引用
2、在方法调用时,传递和返回对象,传递和返回的是:
对象的引用
3、
class Student{
public int code;
}
以下代码:
final Student s = new Student();
s.code = 3;
s.code= 5;
是否正确?为什么?
正确,s指向的对象不能改变,但是该对象的属性的值可以改变。
对象的引用
2、在方法调用时,传递和返回对象,传递和返回的是:
对象的引用
3、
class Student{
public int code;
}
以下代码:
final Student s = new Student();
s.code = 3;
s.code= 5;
是否正确?为什么?
正确,s指向的对象不能改变,但是该对象的属性的值可以改变。