write the Java shorthand for x=x+10
Answers
Answered by
2
Answer:
x+=10
Explanation:
Shorthand operator or Arithmetic Assignment operator is the combination of binary(Arithmetic) operator and assignment operator.
Ex: +-, -=, *=, /=, %=
so, here : in x=x+10, = is assignment operator and + is binary operator.
Therefore, x=x+10 can be also written as x+= 10
Remember: "=" will always be after binary operator. x=x+10 can't be written as x=+10
Similar questions