हिंदी

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
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Variables and Expressions - EXERCISE [पृष्ठ १३३]

APPEARS IN

धीरज मेहरोत्रा Computer Science [English] Class 12
अध्याय 6 Variables and Expressions
EXERCISE | Q 46. | पृष्ठ १३३
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×