Multiple choice technology web technology

What will be the output of the following statement? System.out.println ("1" + 3);

  1. 132

  2. Exception arises

  3. 4

  4. 13

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In Java, when the + operator is used with a String and any other type, Java performs string concatenation. The integer 3 is converted to its string representation "3" and concatenated with "1", resulting in "13". This is a fundamental Java behavior - the + operator is overloaded for both arithmetic addition and string concatenation. Option A is incorrect (would require different order), Option B is wrong (no exception), Option C would only result from arithmetic addition of integers.