CheckNowCheckNow
来源:互联网 发布:网络流行语沙发的含义 编辑:程序博客网 时间:2024/05/26 05:53
public class ListReference { <span style="white-space:pre"></span>public List lobs = new ArrayList();<span style="white-space:pre"></span>public int robins;<span style="white-space:pre"></span>public String lufys;<span style="white-space:pre"></span><span style="white-space:pre"></span>public ListReference(List aa, int bb, String lufy) {<span style="white-space:pre"></span>this.lobs = aa;<span style="white-space:pre"></span>this.robins = bb;<span style="white-space:pre"></span>this.lufys = lufy;<span style="white-space:pre"></span>// TODO Auto-generated constructor stub<span style="white-space:pre"></span><span style="white-space:pre"></span><span style="white-space:pre"></span>this.lobs.add("fuckkkkkkkkkkkkkkkkkkkkkkkkk");<span style="white-space:pre"></span>this.robins = this.robins +10;<span style="white-space:pre"></span>this.lufys = this.lufys + "ased";<span style="white-space:pre"></span>}<span style="white-space:pre"></span>public static void main(String args[]) {<span style="white-space:pre"></span>List newLobs = new ArrayList();<span style="white-space:pre"></span><span style="white-space:pre"></span>int robin = 5;<span style="white-space:pre"></span>String lufy ="lufy";<span style="white-space:pre"></span>ListReference lr = new ListReference(newLobs,robin,lufy);<span style="white-space:pre"></span>System.out.print(newLobs.size() + ">>" + robin + " "+ lufy);<span style="white-space:pre"></span>}}可以发现方在堆中的list在被引用到构造方法后自身也变了,但是同样是在堆中的stringbuffer/string是没有变 求解
0 0
- CheckNowCheckNow
- CUDA 中 FFT 的使用
- tcp/ip协议的三次握手
- ArcGIS Server数据注册
- Ubuntu下安装NAO机器人相应软件
- matlab-自控原理 二阶纯数字矩阵求伴随矩阵
- CheckNowCheckNow
- Tomcat 7 在 Centos 6 上启动慢的解决办法
- 根据布局截图
- 利用Java自带的MD5加密
- matlab-自控原理 二阶纯数字矩阵求行列式
- Android4.3 Bluetooth 抓取hci log
- matlab-自控原理 二阶纯数字矩阵求逆矩阵
- js document.body.onload报错
- matlab-自控原理 已知A矩阵求线性定常系统的矩阵指数函数