当前位置:网站首页>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
边栏推荐
- 【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
- 使用dnSpy对无源码EXE或DLL进行反编译并且修改
- GUI 应用:socket 网络聊天室
- It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
- Cesiumjs 2022^ source code interpretation [8] - resource encapsulation and multithreading
- 0 basic learning C language - nixie tube dynamic scanning display
- From functools import reduce -- see the use of reduce function from typical examples
- 基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
- 7.1 learning content
- String hash, find the string hash value after deleting any character, double hash
猜你喜欢

MPLS experiment

Huawei rip and BFD linkage

我管你什么okr还是kpi,PPT轻松交给你

A-Frame虚拟现实开发入门

Function: store the strings entered in the main function in reverse order. For example, if you input the string "ABCDEFG", you should output "gfedcba".

AI 助力艺术设计抄袭检索新突破!刘芳教授团队论文被多媒体顶级会议ACM MM录用
![[cloud native topic -48]:kubesphere cloud Governance - operation - overview of multi tenant concept](/img/b4/961b3b44e9ecbfd4bddd04318b663a.jpg)
[cloud native topic -48]:kubesphere cloud Governance - operation - overview of multi tenant concept

【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client

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

Beijing invites reporters and media
随机推荐
Future源码一观-JUC系列
Stringutils and collectionutils
2-redis architecture design to use scenarios - four deployment and operation modes (Part 2)
【.NET+MQTT】. Net6 environment to achieve mqtt communication, as well as bilateral message subscription and publishing code demonstration of server and client
Swagger2 quick start and use
删除所有值为y的元素。数组元素中的值和y的值由主函数通过键盘输入。
The super fully automated test learning materials sorted out after a long talk with a Tencent eight year old test all night! (full of dry goods
功能:将主函数中输入的字符串反序存放。例如:输入字符串“abcdefg”,则应输出“gfedcba”。
Flutter local database sqflite
MySQL -- Introduction and use of single line functions
Wechat official account and synchronization assistant
Introduction to unity shader essentials reading notes Chapter III unity shader Foundation
For loop
Force deduction solution summary 1189- maximum number of "balloons"
[common error] UART cannot receive data error
Oracle database knowledge points that cannot be learned (III)
Data mining vs Machine Learning: what is the difference between them? Which is more suitable for you to learn
Sorry, Tencent I also refused
It is worthy of "Alibaba internal software test interview notes" from beginning to end, all of which are essence
PMP 考试常见工具与技术点总结