package string;

public class MemAddrChange {
public static void main(String[] args) { // const 常量区, 堆区 new String() 从const区Copy 一份
String str1 = "hello";
String str2 = "hello";
String str3 =new String("hello");
System.out.println(str1==str3); //false
System.out.println(str1==str2); // == compare point addr,引用地址
System.out.println(str1.equals(str3)); // compare content of mem
}
} class Dog{
int a =11;
}

最新文章

  1. java项目导入IntelliJ IDEA
  2. hdu 1561 The more, The Better(树形dp,基础)
  3. PHP安装memcache扩展接口步骤
  4. MYSQL例题合集
  5. [.Net MVC] 用户角色权限管理_使用CLK.AspNet.Identity
  6. Python中的深浅拷贝,赋值及引用
  7. (转)关闭iptables和SELinux
  8. MicroPython开发板:TPYBoard v102 播放音乐实例
  9. 如何获取离线安装Chrome扩展程序的包
  10. jzoj6101. 【GDOI2019模拟2019.4.2】Path
  11. centos 检测aufs 并安装
  12. Linux CAT与ECHO命令详解
  13. 在table表格中实现圆角效果
  14. Android Studio中设置一个按钮的不同点击触发事件
  15. 使用Docx4j创建word文档
  16. Linux下nagios网络监控与/proc/net/tcp文件详解
  17. 论 html与css的关系
  18. ES6,先知道这些必会的才行
  19. Java开发工程师(Web方向) - 02.Servlet技术 - 第2章.Cookie与Session
  20. spring和Quartz的集群(二)

热门文章

  1. linux100讲——80 系统函数库介绍
  2. [POI2010] GIL-Guilds - 二分图染色,DFS
  3. git pull报错you do not have permission to pull from the repository
  4. 关于Javascript闭包的理解
  5. linux基础之CentOS启动流程
  6. LAMP(六)之以CentOS6自带的rpm包组合安装lamp
  7. FatMouse and Cheese HDU - 1078 dp
  8. OWASP安装
  9. python中os.sep的作用以及sys._getframe().f_back.f_code.co_xxx的含义
  10. 10.3.4参数绑定 bind