java 4th power code example Example 1: raise number to power java Math.pow(number, power); Example 2: how to find powers in java int n=Math.pow(N, P);