当前位置:网站首页>"= =" difference from equals
"= =" difference from equals
2022-07-21 23:12:00 【Bravo!】
equals It is mainly applied to reference type strings (String) Comparison of contents ,"==" Compare memory addresses , Therefore, inaccurate results will be produced during comparison ( As shown in Fig. 1 ).
notes : When comparing pure character strings , If case insensitive comparison , You can call equalsIgnoreCase();
"==" It belongs to the relational operator , Can be used to compare some ( except double) Basic data type , Such as :int char Whether the data or calculation results of are equal ( Pictured )
attach :double Type cannot be used "==" Compare , The result will produce errors , some double The calculation result of type is not accurate , So compare double type , Usually we will judge whether the absolute value of their difference is less than a specific value ; Refer to the below
边栏推荐
猜你喜欢
Excel文件的解析
Hcip day 2
OSPF --- 开放式最短路径优先协议
PageHelper的使用,简单通俗的写一下
静态路由简单练习
SIP account acquisition method of Telecom Optical cat network phone
Back culling | no culling mode and the drawing of transparent objects
The difference between get and post and their respective packet capturing and packet changing
HCIA static comprehensive experiment
P2P网络和虚拟专线综合实验
随机推荐
Hcip day 10
当UDP协议客户端给TCP协议服务器发数据会发生什么
Opening animation production of playable Director (timeline) 3D game
HCIP day1
HCIA rip experiment
C implementation of balanced tree of binary tree
What technical support does okcc call center need to realize its functions
Hcip day 1
OSPF路由回馈及策略
HCIA_NAT实验
What are the types of call center telephone customer service system
Dynamic routing ---rip
Properties文件的读取和写入
What is SIP Protocol?
[untitled] rhcsa first operation
四路病房呼叫系统
RIP实验
System construction solutions of call centers in different scales
基于TCP实现客户端与服务器的图片传送
The principle, main technology, deployment, advantages and disadvantages of firewall