java.lang.Long.lowestOneBit()


java.lang.Long.lowestOneBit()

package com.codingdict;



import java.lang.*;



public class LongDemo {



   public static void main(String[] args) {



      long l = 210;

      System.out.println("Number = " + l);



      /* returns the string representation of the unsigned long value 

         represented by the argument in binary (base 2) */

      System.out.println("Binary = " + Long.toBinaryString(l));



      /* returns a long value with at most a single one-bit, in the position

         of the lowest-order ("rightmost") one-bit in the specified int value.*/

      System.out.println("Lowest one bit = " + Long.lowestOneBit(l));

   }

}