Java基础课件:Math类的使用

package org.lxh.demo11.mathdemo;
public class MathDemo01 {
public static void main(String[] args) {
System.out.println("求平方根:" + Math.sqrt(9.0));
System.out.println("求两数的最大值:" + Math.max(10, 30));
System.out.println("求两数的最小值:" + Math.min(10, 30));
System.out.println("2的3次方:" + Math.pow(2, 3));
System.out.println("四舍五入:" + Math.round(33.6));
}
}
ppt 文件大小:9.27MB