当前位置:网站首页>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
边栏推荐
- HackTheBox-baby breaking grad
- On covariance of array and wildcard of generic type
- Since the "epidemic", we have adhered to the "no closing" of data middle office services
- How to be a professional software testing engineer? Listen to the byte five year old test
- A little understanding of GSLB (global server load balance) technology
- Is it really possible that the monthly salary is 3K and the monthly salary is 15K?
- 2022 Software Test Engineer skill list, please check
- How to use AHAS to ensure the stability of Web services?
- Future source code view -juc series
- About uintptr_ T and IntPtr_ T type
猜你喜欢

It is worthy of "Alibaba internal software test interview notes" from beginning to end, all of which are essence

It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction

2-Redis架构设计到使用场景-四种部署运行模式(下)

CLP information - how does the digital transformation of credit business change from star to finger?

What is regression testing? Talk about regression testing in the eyes of Ali Test Engineers

Eight year test old bird, some suggestions for 1-3 year programmers

2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)

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

OS interrupt mechanism and interrupt handler

String hash, find the string hash value after deleting any character, double hash
随机推荐
OS interrupt mechanism and interrupt handler
Stringutils and collectionutils
Print diamond pattern
Software testers, how can you quickly improve your testing skills? Ten minutes to teach you
All in one 1407: stupid monkey
A dichotomy of Valentine's Day
mysql使用视图报错,EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
The FISCO bcos console calls the contract and reports an error does not exist
不得不会的Oracle数据库知识点(三)
2-Redis架构设计到使用场景-四种部署运行模式(下)
关于 uintptr_t和intptr_t 类型
Understanding of Radix
Self study software testing. To what extent can you go out and find a job?
Function: store the strings entered in the main function in reverse order. For example, if you input the string "ABCDEFG", you should output "gfedcba".
Data mining vs Machine Learning: what is the difference between them? Which is more suitable for you to learn
gslb(global server load balance)技术的一点理解
“疫”起坚守 保障数据中台服务“不打烊”
[prefix and notes] prefix and introduction and use
Avoid playing with super high conversion rate in material minefields
GUI 应用:socket 网络聊天室