A
Q. What is the output of the code snippet with the ternary operator?
Code:
int p=5;
System.out.print("Hello ");
(p<6)?5:6;
System.out.print("Hello ");
(p<6)?5:6;
- Correct Answer - Option(D)
- Views: 17
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.