![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java 引用传递
文章平均质量分 77
「已注销」
这个作者很懒,什么都没留下…
展开
-
Java 引用传递
引用传递核心意义:同一块堆内存空间可以被不同的栈内存指向,不同栈内存可以对同一个堆进行内容修改。public class Demo { public static void main(String[] args) { String msg = "Hello"; fun(msg); System.out.println(msg); } public static void fun...原创 2018-04-20 17:26:28 · 181 阅读 · 0 评论 -
Java 引用传递(实际应用)
范例:class Member { private Car car; private Member child; private int no; private String name; public Member(int no, String name) { this.no = no; this.name = name; } public void setChild(M...原创 2018-04-20 17:56:18 · 428 阅读 · 0 评论