Question:What will be the output of the program?
class SSBool 
{
    public static void main(String [] args) 
    {
        boolean b1 = true;
        boolean b2 = false;
        boolean b3 = true;
        if ( b1 & b2 | b2 & b3 | b2 ) /* Line 8 */
            System.out.print("ok ");
        if ( b1 & b2 | b2 & b3 | b2 | b1 ) /*Line 10*/
            System.out.println("dokey");
    }
}
 

A ok 

B dokey 

C ok dokey 

D No output is produced 

E Compilation error 

+ Answer
+ Explanation
+ Report
Total Preview: 6089

Copyright © 2024. Powered by Intellect Software Ltd