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

Increment and Decrement Operators in Java

PHPz
PHPzforward
2023-09-06 10:45:06988browse

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!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete

Related articles

See more