1 Star 0 Fork 0

BESTI.IS.JAVA2018/20165227朱越

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Example8_1.java 657 Bytes
一键复制 编辑 原始数据 按行查看 历史
public class Example8_1 {
public static void main(String args[]) {
String hello = "你好";
String testOne = "你"+"好"; //【代码1】
System.out.println(hello == testOne); //输出结果是true
System.out.println("你好" == testOne); //输出结果是true
System.out.println("你好" == hello); //输出结果是true
String you = "你";
String hi = "好";
String testTwo = you+hi; //【代码2】
System.out.println(hello == testTwo); //输出结果是false
String testThree = you+hi;
System.out.println(testTwo == testThree); //输出结果是false
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/BESTI-IS-JAVA-2018/20165227ZhuYue.git
git@gitee.com:BESTI-IS-JAVA-2018/20165227ZhuYue.git
BESTI-IS-JAVA-2018
20165227ZhuYue
20165227朱越
master

搜索帮助