Online Java Compiler By
JavaTpoint.com
public class IntegerlowestOneBitExample3 { public static void main(String[] args) { int num = 25; System.out.print("Input Number is: " + num); // returns an int value with at most a single one-bit, in the position // of the lowest-order or the rightmost one-bit in the specified int value System.out.print("\nLowhest 1-bit of the given integer is: "+Integer.lowestOneBit(num)); int a = -20; System.out.println("\n\nInput Number is = " + a); System.out.print("Lowest one bit of the given integer is = "+Integer.lowestOneBit(a)); } }
Output