困惑1

以前:有点不太明白,关于常量池,栈,堆,方法区,等方面有点搞不清了。

 源代码:

 1 package com.mon11.day18;
 2 /** 
 3 * 类说明 :
 4 * @author 作者 :chenyanlong
 5 * @version 创建时间:2017年11月18日 
 6 */
 7 public class Demo {
 8 
 9     public static void changeStr(String str){
10         str="welcom";
11         System.out.println(str);
12     }
13     
14     public static void main(String[] args) {
15         String str="1234";
16         changeStr(str);
17         System.out.println(str);
18     }
19 }
View Code

 

posted @ 2017-11-18 17:23  glacial_water  阅读(121)  评论(0编辑  收藏  举报
Document