Shorthand Operator in JavaSome unique Compound Assignment Operators commonly referred to as Shorthand Assignment Operators are provided by Java. Because it offers a quick way to appoint an expression to a variable, it is known as shorthand. The above operator can be used to link the assignment operator and the algebraic operator. You might, for instance, write: a = a-7; The aforementioned sentence can also be expressed in Java as follows: a -= 7; Java uses a variety of compound assignment operators, including:
Example: ShorthandoperatorExpl.java Output: Next TopicWhat is new in Java 17 |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India