String 常量池概念,当String 对象是new 出来的并传参如:String s = new String("hello");//其在堆栈中开辟地址,引用地址在栈中,值存于堆; 当String 传值为: String s = new String;s="hello";//其在常量池中开辟地址 ...
分类:
编程语言 时间:
2016-08-10 12:32:05
阅读次数:
149
传值和传引用
When you’re passing primitives into a method ,you get a distinct copy of the primitive. When you’re passing a reference into a method , you get a copy of the reference....
分类:
编程语言 时间:
2015-08-11 14:17:14
阅读次数:
137