java is 和 == ,以及equal
2024-09-06 07:34:25
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;
}
最新文章
- java项目导入IntelliJ IDEA
- hdu 1561 The more, The Better(树形dp,基础)
- PHP安装memcache扩展接口步骤
- MYSQL例题合集
- [.Net MVC] 用户角色权限管理_使用CLK.AspNet.Identity
- Python中的深浅拷贝,赋值及引用
- (转)关闭iptables和SELinux
- MicroPython开发板:TPYBoard v102 播放音乐实例
- 如何获取离线安装Chrome扩展程序的包
- jzoj6101. 【GDOI2019模拟2019.4.2】Path
- centos 检测aufs 并安装
- Linux CAT与ECHO命令详解
- 在table表格中实现圆角效果
- Android Studio中设置一个按钮的不同点击触发事件
- 使用Docx4j创建word文档
- Linux下nagios网络监控与/proc/net/tcp文件详解
- 论 html与css的关系
- ES6,先知道这些必会的才行
- Java开发工程师(Web方向) - 02.Servlet技术 - 第2章.Cookie与Session
- spring和Quartz的集群(二)
热门文章
- linux100讲——80 系统函数库介绍
- [POI2010] GIL-Guilds - 二分图染色,DFS
- git pull报错you do not have permission to pull from the repository
- 关于Javascript闭包的理解
- linux基础之CentOS启动流程
- LAMP(六)之以CentOS6自带的rpm包组合安装lamp
- FatMouse and Cheese HDU - 1078 dp
- OWASP安装
- python中os.sep的作用以及sys._getframe().f_back.f_code.co_xxx的含义
- 10.3.4参数绑定 bind