您的位置 首页 java

java之学习math类的方法概述

结果示意图

math类的概述

  • A:Math类概述

    * Math 类包含用于执行基本数学运算的方法,如初等指数、 对数 、平方根和三角函数。

  • * B:成员方法

    * public static int abs(int a)

    * public static double ceil(double a)

    * public static double floor(double a)

    * public static int max(int a,int b) min自学

    * public static double pow(double a,double b)

    * public static double random()

    * public static int round(float a) 参数为double的自学

    * public static double sqrt(double a)

    *

    * 注意 : math类里的这些方法都是静态的 所以可以直接 “类名.”调用

案例代码

文章来源:智云一二三科技

文章标题:java之学习math类的方法概述

文章地址:https://www.zhihuclub.com/187117.shtml

关于作者: 智云科技

热门文章

网站地图