Home > Java > javaTutorial > Increment and Decrement Operators in Java

Increment and Decrement Operators in Java

PHPz
Release: 2023-09-06 10:45:06
forward
979 people have browsed it

Increment and Decrement Operators in Java

In this expression a > b || a != b && a == b , && will be in || works before. So a != b && a == b will return false, and then the entire expression will return true because a>b is true. So the result is true, but b and a don't change and always take the values ​​2 and 1 because a==b is checking for equality instead of assigning the value of b to a because of the presence of == (relational operator) instead of = (assignment operator).

The above is the detailed content of Increment and Decrement Operators in Java. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template