Pow(x,n) in Java