当前位置:网站首页>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
边栏推荐
- Windos10 reinstallation system tutorial
- 使用dnSpy对无源码EXE或DLL进行反编译并且修改
- 【.NET+MQTT】.NET6 环境下实现MQTT通信,以及服务端、客户端的双边消息订阅与发布的代码演示
- 基于.NetCore开发博客项目 StarBlog - (14) 实现主题切换功能
- Fundamentals of machine learning: feature selection with lasso
- 打印菱形图案
- 老姜的特点
- 技術實踐|線上故障分析及解决方法(上)
- Pratique technique | analyse et solution des défaillances en ligne (Partie 1)
- In the process of seeking human intelligent AI, meta bet on self supervised learning
猜你喜欢

Since the "epidemic", we have adhered to the "no closing" of data middle office services

Introduction to A-frame virtual reality development

Sorry, Tencent I also refused
![[common error] custom IP instantiation error](/img/de/d3f90cd224274d87fcf153bb9244d7.jpg)
[common error] custom IP instantiation error

swagger中响应参数为Boolean或是integer如何设置响应描述信息

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

Data mining vs Machine Learning: what is the difference between them? Which is more suitable for you to learn

How to set the response description information when the response parameter in swagger is Boolean or integer

功能:求出菲波那契数列的前一项与后一项之比的极限的 近似值。例如:当误差为0.0001时,函数值为0.618056。

Future源码一观-JUC系列
随机推荐
Data mining vs Machine Learning: what is the difference between them? Which is more suitable for you to learn
打印菱形图案
Software testers, how can you quickly improve your testing skills? Ten minutes to teach you
功能:求5行5列矩阵的主、副对角线上元素之和。注意, 两条对角线相交的元素只加一次。例如:主函数中给出的矩阵的两条对角线的和为45。
It's OK to have hands-on 8 - project construction details 3-jenkins' parametric construction
2-Redis架构设计到使用场景-四种部署运行模式(下)
不得不会的Oracle数据库知识点(二)
All in one 1407: stupid monkey
The FISCO bcos console calls the contract and reports an error does not exist
From functional testing to automated testing, how did I successfully transform my salary to 15K +?
技術實踐|線上故障分析及解决方法(上)
Long article review: entropy, free energy, symmetry and dynamics in the brain
Wechat official account and synchronization assistant
AI helps make new breakthroughs in art design plagiarism retrieval! Professor Liu Fang's team paper was employed by ACM mm, a multimedia top-level conference
MySQL - use of aggregate functions and group by groups
Analysis and solution of lazyinitializationexception
Query efficiency increased by 10 times! Three optimization schemes to help you solve the deep paging problem of MySQL
Function: find the approximate value of the limit of the ratio of the former term to the latter term of Fibonacci sequence. For example, when the error is 0.0001, the function value is 0.618056.
MySQL -- Introduction and use of single line functions
A-Frame虚拟现实开发入门