Java Operator Precedence
What is printed when the following code segment is executed?
public class ModuloPrecedence {
public static void main(String[] args) {
int result = 5 + 3 * 2 % 4;
System.out.println(result);
}
}
A
6
B
5
C
7
D
16
Question Leaderboard
Not enough data yet to show leaderboard.
