Practice mode Java

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

Correct answer A. 55

Explanation

Evaluation is left to right, so 3 + 2 is added as numbers to give 5 first, and then concatenated with "5" to print "55".

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.