public class Test
{
public static void main(String[] args)
{
double a=2,b=3;
double z1=Math.pow(a,b);
double z2=Math.sqrt(9);
System.out.println("z1="+z1);
System.out.println("z2="+z2);
}
}

运行结果:

数学函数类方法的使用.java-LMLPHP

05-11 13:26