I understand that the result of Math.pow() is a double.
However, why isn't the below code causing an integer overflow when I have explicitly casted the result to an int? Also, why is the result of both 'a' and 'b' the same i.e 2147483647
int a=(int)(Math.pow(2,377));
int b=(int)(Math.pow(2,32));
System.out.println(a);
System.out.println(b);