2 to power of 2 in java code example Example: java is power of 2 Click to copyboolean result = number > 0 && ((number & (number - 1)) == 0);