Java Blog

 
 
 
 public class JAVA_010
 {

    public static void main(String[] args)
    {
       int a=26317;  // 0110011011001101

       int b=(~a);   // 1001100100110010

       System.out.println(\"a = 0110011011001101 = \" + a);
       System.out.println(\"b = ~a = 1001100100110010 = \" + b);
    }
 }

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