null作为方法的参数,并在方法里面赋值后的结果是什么?
Posted 一匹河马
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了null作为方法的参数,并在方法里面赋值后的结果是什么?相关的知识,希望对你有一定的参考价值。
public class BeanCopyTest {
public static void main(String[] args){
Student student = null;
objectCopy(student);
System.out.print(autoTenderSetDTO);
}
public static void objectCopy(Student student){
student = new Student();
student.setName("张三");
}
}
以上是关于null作为方法的参数,并在方法里面赋值后的结果是什么?的主要内容,如果未能解决你的问题,请参考以下文章