The lowestOneBit () method of Java Integer class returns an int value with at most a single one-bit, in the position of the lowest-order one-bit in the specified int value.


public static int lowestOneBit(int i)


The parameter ‘i’ represents the value whose lowest one bit is to be calculated.

 Return Value

This method returns an int value with a single one-bit in the lowest-order position.

Example 1


Example 2


Example 3


Example 4


Pin It on Pinterest

Share This