当前位置:网站首页>Parsing of string class intern() method
Parsing of string class intern() method
2022-04-23 05:23:00 【Cx_ Xuan】
String class intern() Method
public static void main(String[] args) {
String a = new String("Cx");
String b = new String("Cx");
String c = "Cx";
System.out.println(a==b);//--false
System.out.println(a==c);//--false
System.out.println(a.intern()==b);//false
System.out.println(a.intern()==c);//true
System.out.println(a.intern()==b.intern());//true
}
The results have been given .
版权声明
本文为[Cx_ Xuan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220545385585.html
边栏推荐
猜你喜欢
Three of three JS (webgl) is simple to draw lines / arcs according to points (based on linegeometry / line2 / linematerial, draw two arc segments based on the center of the circle)
2021-11-08
源码剖析Redis中如何使用跳表的
!!!!!!!!!!!!!!!!!!
C test calls the paddlesharp module to recognize pictures and words
Let the LAN group use the remote device
JSP-----JSP简介
Three 之 three.js (webgl)旋转属性函数的简单整理,以及基于此实现绕轴旋转的简单案例
Laravel routing settings
Basic use of sqlyog
随机推荐
2021-10-12
2021-11-01
The annual transaction volume of the app store is US $1 million, and only 15% commission is paid. Small and medium-sized developers are very contradictory
egg的static的前缀是可以修改惹,靴靴
Traversal of tree
Mariadb的半同步复制
Interview summary
What are the reasons for the failure of digital transformation?
MFC实现资源单独Dll实现
JS Array常见方法
[untitled] kimpei kdboxpro's cool running lantern coexists with beauty and strength
WTL self drawn control library (cqscheckcomboxbox)
Three of three JS (webgl) is simple to draw lines / arcs according to points (based on linegeometry / line2 / linematerial, draw two arc segments based on the center of the circle)
Tslint annotations ignore errors and restful understanding
MySQL external connection, internal connection, self connection, natural connection, cross connection
Click the Add button - a box appears (similar to adding learning experience - undergraduate - Graduate)
改进DevSecOps框架的 5 大关键技术
Anti crawler (0): are you still climbing naked with selenium? You're being watched! Crack webdriver anti crawler
Three 之 three.js (webgl)模型的删除/场景的清空/内存的释放 的简单整理
Minimum spanning tree -- unblocked project hdu1863