Multiple choice technology programming languages

What does it print? public class Elementary { public static void main(String[] args) { System.out.println(12345 + 5432l); } }

  1. Compilation error

  2. Runtime error

  3. 17777

  4. 66666

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

The expression adds an integer (12345) and a long literal (5432l). Java automatically promotes the int to long and performs the addition, resulting in 17777, which is printed to the console. Option A is incorrect because the code is syntactically valid. Option B is incorrect because there are no runtime errors. Option D is incorrect because it represents simple concatenation, not arithmetic addition.