Q. What will be the output?
Code:
System.out.println(10 + 20 + "Java" + 10 + 20);
β
Correct Answer: (B)
30Java1020
Explanation: Evaluation is left to right. 10+20=30, then string concatenation results in 30Java1020.