

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Increment and decrement operators in Java
in this expression a > b || a != b && a == b++, according to operator precedence && will work first before ||. So a != b && a == b++ will return false and after that whole expression returns true as a>b is true. So result is true but b and a will not be changed and take the values 2 and 1 always because a==b++ is checking for equality not assigning the value of b++ to a as there is ==(relational operator) not =(assignment operator).
- Related Questions & Answers
- Python Increment and Decrement Operators
- Increment and Decrement Operators in C#
- Increment ++ and decrement -- Operators in C++
- Increment and Decrement Operators in Python?
- PHP Increment/Decrement Operators
- Interesting facts about Increment and Decrement operators in Java
- What are increment (++) and decrement (--) operators in C#?
- What are the restrictions on increment and decrement operators in java?
- Why avoid increment (“++”) and decrement (“--”) operators in JavaScript?
- Increment ++ and Decrement -- Operator Overloading in C++
- Pre-increment (or pre-decrement) in C
- Write a C program to demonstrate post increment and pre increment operators
- Count of suffix increment/decrement operations to construct a given array in C++
- Create increment decrement plus minus buttons programmatically for HTML input type number in JavaScript
- Differences between | and || operators in Java
Advertisements