java.lang.Math.pow方法
Modifier and Type | 方法 | 描述 |
---|---|---|
static double |
pow(double a, double b) |
将第一个参数的值返回到第二个参数的幂。 |
pow(double a, double b)
public class TestMax {
public static void main(String[] args) {
test();
}
//测试 pow(double a, double b)方法
public static void test(){
double pow = Math.pow(1.2, 2);
System.out.println("1.2的2次方:"+pow);
}
}
1.2的2次方:1.44