当前位置:网站首页>Logical operator, displacement operator
Logical operator, displacement operator
2022-07-04 01:10:00 【@Where did you get Xuan ^o^】
Logical operators
&&( And ) ||( or ) !( Take the opposite )
boolean a=true; boolean b=false; Systen.out.pritnln("a&&b:"+(a&&b));// Logic and computation : Both variables are true , The result is true false Systen.out.println("a||b:"+(a||b));// Logic or operation : Two variables and one is true , The result is true true Systen.out.println("!(a&&b):"+!(a&&b));// The result is true , It becomes false , If true, it becomes false trueShort-circuit operation ( If the first condition is not satisfied, the next condition will not be executed )
int c=5; boolean d=(c<4)&&(c++<4); Systen.out.pritnln(c);//5 Systen.out.pritnln(d);//false
Displacement operators
& 、|、^、~、>>、<<、
/* A =0011 1100 B =0000 1101 A&B=0000 1100 A|B=0011 1101 A^B=0011 0001 ~B =1111 0010 2*8=16 2*2*2*2 Efficient !!! << *2 >> /2 0000 0000 0 0000 0001 1 0000 0010 2 0000 0100 4 0000 1000 8 0001 0000 16 */ Systen.out.pritnln(2<<3);//16
边栏推荐
- Employees' turnover intention is under the control of the company. After the dispute, the monitoring system developer quietly removed the relevant services
- Regular expression of shell script value
- Msp32c3 board connection MSSQL method
- Gee: create a new feature and set corresponding attributes
- 在寻求人类智能AI的过程中,Meta将赌注押向了自监督学习
- 查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
- How to use AHAS to ensure the stability of Web services?
- Query efficiency increased by 10 times! Three optimization schemes to help you solve the deep paging problem of MySQL
- Windos10 reinstallation system tutorial
- Introduction to A-frame virtual reality development
猜你喜欢

技術實踐|線上故障分析及解决方法(上)

On covariance of array and wildcard of generic type

Beijing invites reporters and media

On the day when 28K joined Huawei testing post, I cried: everything I have done in these five months is worth it

Release and visualization of related data

MySQL - use of aggregate functions and group by groups

技术实践|线上故障分析及解决方法(上)

【.NET+MQTT】.NET6 环境下实现MQTT通信,以及服务端、客户端的双边消息订阅与发布的代码演示

How to use AHAS to ensure the stability of Web services?

A malware detection method for checking PLC system using satisfiability modulus theoretical model
随机推荐
Stringutils and collectionutils
删除所有值为y的元素。数组元素中的值和y的值由主函数通过键盘输入。
[error record] configure NDK header file path in Visual Studio (three header file paths of NDK | ASM header file path selection related to CPU architecture)
The difference between fetchtype lazy and eagle in JPA
功能:将主函数中输入的字符串反序存放。例如:输入字符串“abcdefg”,则应输出“gfedcba”。
C library function int fprintf (file *stream, const char *format,...) Send formatted output to stream
查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题
Weekly open source project recommendation plan
Pratique technique | analyse et solution des défaillances en ligne (Partie 1)
Query efficiency increased by 10 times! Three optimization schemes to help you solve the deep paging problem of MySQL
Beijing invites reporters and media
Function: write function fun to find s=1^k+2^k +3^k ++ The value of n^k, (the cumulative sum of the K power of 1 to the K power of n).
2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
All in one 1412: binary classification
Five high-frequency questions were selected from the 200 questions raised by 3000 test engineers
What is the GPM scheduler for go?
Is it really possible that the monthly salary is 3K and the monthly salary is 15K?
Characteristics of ginger
Cesiumjs 2022^ source code interpretation [8] - resource encapsulation and multithreading
查询效率提升10倍!3种优化方案,帮你解决MySQL深分页问题