Arithmetic and String Ordering
A sequence of integer additions and String concatenations are performed within a single print statement.
What is printed when the following Java program is compiled and run?
public class QuestionTrace {
public static void main(String[] args) {
System.out.println(1 + 2 + " " + 3 + 4 + 5);
}
}
A
3 345
B
3 120
C
12 345
D
3 12
Question Leaderboard
Not enough data yet to show leaderboard.
