玉溪市住房城乡建设局网站,青州网站建设,水利厅网站集约化建设,在线美工1 常用API API(:Application Programming Interface ):应用程序编程接口1.1 Math类 Math中没有构造方法,类的成员都是静态的(static修饰),通过类名就可以直接调用常用方法方法名说明public static int abs(int a)获取参数a的绝对值public static double ceil(double a) …1 常用API
API(:Application Programming Interface ):应用程序编程接口1.1 Math类
Math中没有构造方法,类的成员都是静态的(static修饰),通过类名就可以直接调用常用方法方法名说明public static int abs(int a)获取参数a的绝对值public static double ceil(double a) [ce’l]向上取整public static double floor(double a)向下取整public static long round(double a)四舍五入取整public static int max(int a,int b)返回两个数中较大值public static int min(int a,int b)返回两个数中较小值public static double pow(double a,double b)获取a的b次幂public static double random()返回值为double类型随机数