Disable ads (and more) with a membership for a one time $4.99 payment
Which operation can be used for both string concatenation and arithmetic addition in Java?
+
*
-
+=
The correct answer is: +
In Java, the + operator can be used for both string concatenation and arithmetic addition. This operator is most commonly associated with addition, but it can also be used to concatenate strings. The * and - operators are used for multiplication and subtraction, respectively. The += operator is a compound assignment operator, which combines addition and assignment. It is not used for string concatenation. Therefore, the correct answer would be A.