A
Q. What is the output of this program?
Code:
public class bool_operator_Example
{
public static void main(String args[])
{
boolean p = true;
boolean q = !true;
boolean r = p | q;
boolean s = p & q;
boolean z = s ? q : r;
System.out.println(s + " " + z);
}
}
{
public static void main(String args[])
{
boolean p = true;
boolean q = !true;
boolean r = p | q;
boolean s = p & q;
boolean z = s ? q : r;
System.out.println(s + " " + z);
}
}
- Correct Answer - Option(A)
- Views: 14
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.