Examveda
Examveda

What will be the output of the following Java code?
class bool_operator 
{
    public static void main(String args[]) 
    {    
         boolean a = true;
         boolean b = !true;
         boolean c = a | b;
   boolean d = a & b;
         boolean e = d ? b : c;
         System.out.println(d + " " + e);
    } 
}

A. false false

B. true ture

C. true false

D. false true

Answer: Option D


This Question Belongs to Java Program >> Operators

Join The Discussion

Related Questions on Operators