当前位置:网站首页>Similarities and differences between equals and "= ="
Similarities and differences between equals and "= ="
2022-07-25 22:48:00 【Cool hair】
The same thing :
1. Are used to compare whether the contents of objects are equal ;
2. All have return values , The return value types are boolean.
Difference :
1.equals Used to compare the contents of reference types , Cannot be used to compare basic data types ;
2.“==” Usually used to compare basic data types , Compare the memory addresses of the two objects , Generally, it is not used for comparing reference type data .
summary :
1. If it's some plastic surgery , Such as byte,short etc. , Use “==” To compare
2. If it's an object , Use equals Methods for comparison
3. If it is double,float This type , Then transpose first int Or is it long This type can be used again “==” Compare
4. If it is the contents of the array , Use equals Methods to compare .
边栏推荐
- Express framework
- Today, learn about the use of lists, hyperlinks, image tags, and audio and video
- (1) DDL, DML, DQL, DCL and common data types
- XSS tool beef XSS installation and use
- [training day13] backpack [dynamic planning] [greed]
- Kibana~ the process number cannot be found after kibana is started in the background
- ML-Numpy
- Mocha test
- Short circuit and &, short circuit or |, logic and &, logic or |; Conditional operator
- Five constraints and three paradigms
猜你喜欢

Mysql数据类型

1000个Okaleido Tiger首发上线Binance NFT,引发抢购热潮
![[training day13] travel [violence] [dynamic planning]](/img/ac/dd52771fec20432fd084d8e3cc89e1.png)
[training day13] travel [violence] [dynamic planning]
![[training day15] good name [hash]](/img/62/5cd354e63aab861bf8fa1f265b6986.png)
[training day15] good name [hash]
![[training Day12] min ratio [DFS] [minimum spanning tree]](/img/f8/e37efd0d2aa0b3d79484b9ac42b7eb.png)
[training Day12] min ratio [DFS] [minimum spanning tree]

Summary 1 - deep learning - basic knowledge learning

The third programming competition of Wuhan University of technology b- save the kingdom of DAG (topological properties deal with accessibility Statistics)

自媒体人必备的4个素材网站,再也不用担心找不到素材

Multi data source switching
![[文献阅读] - HRL -[HRL with Universal Policies for Multi-Step Robotic Manipulation]](/img/34/06d5ba3af4e6e775a335324c020161.png)
[文献阅读] - HRL -[HRL with Universal Policies for Multi-Step Robotic Manipulation]
随机推荐
3 lexical analysis
CUDA environment construction
我们为什么要推出Getaverse?
【集训DAY12】树!树!树!【贪心】【最小生成树】
[training day15] boring [tree DP]
【集训DAY15】简单计算【树状数组】【数学】
Structure principle of micro ball vibration switch with chip
【集训DAY13】Internet【并查集】
JVM memory area
[tensorflow] 关于 seed
【集训DAY13】Backpack【动态规划】【贪心】
【集训DAY12】Minn ratio 【dfs】【最小生成树】
Madness. MySQL learning.
Short circuit effect of logical operators short circuit and short circuit or
Ribbon execution logic source code analysis
JD quick navigation box
Opencv compile and call GPU version
[training day15] simple calculation [tree array] [mathematics]
QT的Tree View Model示例
Compiler introduction