Correct is D. To be 3, in secound line needs (1 + 2) and not "(1) + (2)" or "1 + 2". When have String + in "Println", the numbers need to sum be in an expression without non-primitive types or be enclosed in parentheses also without non-primitive types. When you have a non-primitive type together with a primitive in println, concatenation is done. Here's the logic of the expression:
Result + (1) + (2)
Result + 1 + 2
----------------------------
Result 12
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
iSnover
Highly Voted 9 months, 4 weeks agospongecodes
Most Recent 4 months agokkaayyyy
9 months, 1 week ago