数学函数的调用 在Math类中Java定义了许多数学函数 double a=4; double b=Math.sqrt(a);//平方根 double c=Math.pow(x,a);//x的a次幂 double d=Math.sin(a);//三角函数 double e=Math.PI;//常量 注: 导包以后则不需在数学方法名,和常量名前加前缀"Math" 具体查看API文档