P

Praveen Singh • 36.81K Points
Coach

Q. What will be the output of the following Java program?

Code:
class bitwise_operator 
{
    public static void main(String args[]) 
    {    
         int a = 3;
         int b = 6;
   int c = a | b;
         int d = a & b;             
         System.out.println(c + " "  + d);
    } 
}
  • (A) 7 2
  • (B) 1 & 4
  • (C) 7 5
  • (D) 5 2
  • Correct Answer - Option(A)
  • Views: 36
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics