当前位置:网站首页>String类intern()方法解析
String类intern()方法解析
2022-04-22 05:46:00 【Cx_轩】
String类intern()方法
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
}
结果已经给出。
版权声明
本文为[Cx_轩]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_25223941/article/details/50175609
边栏推荐
猜你喜欢

STL学习笔记0x0001(容器分类)

Write an article about DDT data-driven automated testing

qt显示图片的指定位置和大小

AD5724 bipolar ADC

Chorme debugging tool

QSS、QDateEdit、QCalendarWidget自定义设置

Access problems after setting up the local server

在components文件夹下创建Tabbar组件,公用

Installation of QT learning

Daily learning record -- solving graphviz Chinese garbled code problem
随机推荐
re将Form表单转json
Compiling OpenSSL of arm64 on M1 chip
STM32 learning note 2 - set GPIO register to realize running water lamp
Code color difference of QT learning
Intel SGX初步学习理解笔记(持续更新)
Experience of constructing H-bridge with MOS tube
Use of tab control control in MFC
Setting time and date display of QT learning
Intel SGX thread lock
Universal timer
Pykmip test
Heap basic operation source code Bing
Ocilib library connected to Oracle
C learning experience of commission, thread and timer
membarrier(个人学习理解)
Introduction to Intel SGX development
STM32 learning note 3 - input pin of GPIO
Chorme debugging tool
Characteristics and usage of QT signal and slot
QSslSocket::connectToHostEncrypted: TLS initialization failed