Math.pow() does only return doubles.
There are two versions (this is called "overloading") of Math.max(...):
Math.max(int, int) returns an int
Math.max(double,double) returns a double
Which method gets called depends on what parameter types you pass into it...