To calculate the result of "power of number" in Java, calling the method:
static double pow(double a, double b)
It returns the value of the first argument (a) raised to the power of the second argument (b).
PS. ^ operator in Java is Bitwise exclusive OR.