当前位置:网站首页>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
边栏推荐
- 青岛敏捷之旅,来了!
- 如何在Word中添加漂亮的代码块 | 很全的方法整理和比较
- Output string in reverse order
- 史上最强egg框架的error处理机制
- Graphics. Fromimage reports an error "graphics object cannot be created from an image that has an indexed pixel..."
- Laravel routing job
- 我这位老程序员对时代危险和机遇的一点感悟?
- Power consumption parameters of Jinbei household mute box series
- 学习笔记:Unity CustomSRP-10-Point and Spot Shadows
- What are the most popular recruitment technical skills in 2022? You can't think of it
猜你喜欢
随机推荐
相机成像+单应性变换+相机标定+立体校正
低代码和无代码的注意事项
Modèle axé sur le domaine DDD (III) - gestion des transactions à l'aide de Saga
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
My old programmer's perception of the dangers and opportunities of the times?
Open source rule engine - Ice: dedicated to solving flexible and complex hard coding problems
Where, on when MySQL external connection is used
2021-10-12
Laravel routing settings
Summary of MySQL knowledge points
学习笔记:Unity CustomSRP-10-Point and Spot Shadows
领域驱动模型DDD(三)——使用Saga管理事务
!!!!!!!!!!!!!!!!!!
Tslint annotations ignore errors and restful understanding
TSlint注释忽略错误和RESTful理解
Servlet3 0 + event driven for high performance long polling
What are the reasons for the failure of digital transformation?
Output string in reverse order
Laravel database
Good test data management, in the end how to do?








