power numbers in java code example Example: how to find power of a number in java int powerOfNumber = (int) Math.pow(number, power);