Practice mode Java

What is the output of the Java statement System.out.println(“5” + 3 + 2);?

Correct answer C. 532

Explanation

Evaluation is left to right. "5" + 3 makes the string "53", and adding 2 to a string concatenates again, giving "532".

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.