java 内存数据存储

最近在学习的过程中,越发觉得基础知识的重要性,so 恶补一下

直接上图上示例:

 

图一:

 

 

图二:

 

 

图三:

 

 

[java] view plain copy
 
 print?在CODE上查看代码片派生到我的代码片
  1.  String s1 = "china";  
  2. String s2 = "china";  
  3. String ss1= new String("china");  
  4. String ss2 = new String("china");  
  5.  int i =1;  
  6.  int j =1;  
  7.  public static final int  i1 = 1;  
  8.  public static final int  j1 = 1;  
  9.  Integer it1= 127;  
  10.  Integer it2= 127;  
  11.  Integer it11= 128;  
  12.  Integer it12= 128;  

 

 


 

 

相信看了图,大家就明白了在内存中对象均是如何存储的

posted @ 2016-12-08 09:46  天涯海角路  阅读(116)  评论(0)    收藏  举报