how to find n to the power of p in java code example Example: how to find powers in java int n=Math.pow(N, P);