Are the auto-increment and auto-decrement operators (++ and –) an essential part of the Java language?
Advertisements
प्रश्न
Are the auto-increment and auto-decrement operators (++ and –) an essential part of the Java language?
लघु उत्तरीय
Advertisements
उत्तर
No, the auto-increment (++) and auto-decrement (--) operators are not essential parts of the Java language because their operations can also be performed using addition and subtraction.
For example, a++ is equivalent to a = a + 1, and a-- is equivalent to a = a - 1. However, these operators make programs shorter and easier to write.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
