A
Q. What is the output of this program?
Code:
public class ternary_operator_Example
{
public static void main(String args[])
{
int a = 5;
int b = ~ a;
int c;
c = a > b ? a : b;
System.out.print(c);
}
}
{
public static void main(String args[])
{
int a = 5;
int b = ~ a;
int c;
c = a > b ? a : b;
System.out.print(c);
}
}
- Correct Answer - Option(D)
- Views: 23
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.