Java Blog

 
 
 
 public class JAVA_008
 {
    public static void main(String[] args)
    {
       int a=26317;  // 0110011011001101
       int b=15;     // 0000000000001111

       int c=(a|b);  // 0110011011001111

       System.out.println(\"a = 0110011011001101 = \" + a);
       System.out.println(\"b = 0000000000001111 = \" + b);
       System.out.println(\"c = a|b = 0110011011001111 = \" + c);
    }
 }

 
 
Didn't find what you were looking for? Find more on Program to show the use of Bitwise Operator (|) OR