Given:
What is the result?
Given:
What is the result?
The given code uses a nested ternary operation to determine what value to print. Let's break it down: int i = 3; int j = 25; System.out.println( i > 2 ? i > 10 ? i * (j + 10) : i * j + 5 : i ); First, the outer ternary operator checks if 'i' is greater than 2, which is true since i = 3. Since this condition is true, we move to the second part of the ternary operation: i > 10 ? i * (j + 10) : i * j + 5. Now, we check if 'i' is greater than 10, which is false. Since this condition is false, we take the else part of the second ternary expression: i * j + 5. Here, i * j + 5 = 3 * 25 + 5 = 75 + 5 = 80. Therefore, the result is 80.
D 80 is correct
the expresion looks like this: if (i > 2) { if (i > 10) { System.out.println(i * (j + 10)); } else { System.out.println(i * j + 5); } } else { System.out.println(i); }
D is correct
Correct answer is D TESTED
tested: 80
Correct answer is D