当前位置:网站首页>Assignment operator (geritilent software - Jiuye training)
Assignment operator (geritilent software - Jiuye training)
2022-07-24 08:54:00 【Jiuye (Titan)】
Extended assignment operators
Operator :
+=
-=
/=
%=
grammar :
Operands 1 += Operands 2 Operands 1 -= Operands 2 Operands 1 *= Operands 2 Operands 1 /= Operands 2 Operands 1 %= Operands 2 |
characteristic :
Binary operator .
Operational rules :
a += b
amount to :
a = a + b;
Example 1:
publicclass Demo { publicstaticvoid main(String[] args) { inta = 5; System.out.println(a += 2); System.out.println(a -= 2); System.out.println(a /= 2); System.out.println(a %= 2); } } |
Calculation results :

Example 2:
publicclass Demo { publicstaticvoid main(String[] args) { byten1 = 5; n1 += 2; // Perform automatic implicit forced rotation System.out.println(n1);
} } |
Calculation results :
边栏推荐
- Protocol buffer learning notes
- [translation] integration challenges in microservice architecture using grpc and rest
- Tiktok 16 popular categories, tiktok popular products to see which one you are suitable for?
- Treap
- JQ native write bullet frame mask layer
- The solution of [an error occurred while trying to create a file in the destination directory: access denied] is prompted when installing the software
- 看了纪录片《埃达克岛的海盗宝藏》,想到我国历史上的遗失秘宝
- On express framework
- RPC调用方如何实现异步调用:CompletableFuture
- Recursive performance test
猜你喜欢

Take out the string in brackets

Discuz论坛搭建详细过程,一看就懂

【一起上水硕系列】一起提前看看July课程

Run little turtle to test whether the ROS environment in the virtual machine is complete

xtrabackup 实现mysql的全量备份与增量备份

【一起上水硕系列】EE feedback 详解

使用Go语言开发eBPF程序

Cyclic multiple scatter

Unity解决Package Manager“You seem to be offline”

Xiaobai learns Jenkins - installation and quick start
随机推荐
PXE principle and configuration
Typora提示【This beta version of Typora is expired, please download and install a newer version】的解决方案
Configuration of uni app page.json title bar
On express framework
Treap
Cyclic multiple scatter
On the relationship between C language function name and function pointer
Leetcode102-二叉树的层序遍历详解
Typescript decorator
Tongxin UOS developer account has supported uploading the HAP package format of Hongmeng application
JS string interception
Typora prompt [this beta version of typora is expired, please download and install a new version]
Wargames NATAS (16-19) problem solving essays
Recursive performance test
Guys, what parameters can be set when printing flinksql so that the values can be printed? This later section is omitted. It's inconvenient. I read the configuration on the official website
Change of sheetname
Rocky基础-Shell脚本基础知识
Confusing defer, return, named return value, anonymous return value in golang
Some mistakes that Xiaobai often makes (update from time to time, and promise not to make them again next time)
Treap