Given the following Java code:
```java
public class Main {
public static void main(String[] args) {
int a = 10, b = 5, c = 15;
int result = (a > b) ? (a > c) ? a : c : (b > c) ? b : c;System.out.println(result == 15 ? "Yes" : "No");
} }
```
What is the output?
Exhibit
Refer to the exhibit.
String str = "Hello";
if (str instanceof String) {
System.out.println("Yes");
} else {
System.out.println("No");
}Trap 1: Compilation fails
Incorrect.
Trap 2: No
Incorrect.
Trap 3: Runtime error
Incorrect.
- A
Yes
Correct.
- B
Compilation fails
Why wrong: Incorrect.
- C
No
Why wrong: Incorrect.
- D
Runtime error
Why wrong: Incorrect.