码迷,mamicode.com
首页 > 其他好文 > 详细

null作为方法的参数,并在方法里面赋值后的结果是什么?

时间:2017-07-12 23:13:37      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:student   int   str   rgs   object   赋值   out   class   test   

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作为方法的参数,并在方法里面赋值后的结果是什么?

标签:student   int   str   rgs   object   赋值   out   class   test   

原文地址:http://www.cnblogs.com/yipihema/p/7157608.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!