java 内存数据存储

近期在学习的过程中,越发认为基础知识的重要性,so 恶补一下

直接上图上演示样例:


图一:



图二:



图三:


   String s1 = "china";
  String s2 = "china";
  String ss1= new String("china");
  String ss2 = new String("china");
   int i =1;
   int j =1;
   public static final int  i1 = 1;
   public static final int  j1 = 1;
   Integer it1= 127;
   Integer it2= 127;
   Integer it11= 128;
   Integer it12= 128;



相信看了图,大家就明确了在内存中对象均是怎样存储的




posted @ 2017-07-26 12:56  zsychanpin  阅读(101)  评论(0编辑  收藏  举报