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
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
