1、第七章几个基本的Java类7.1Math类1、常用的数学方法成员变量static doubleEThedoublevaluethatiscloserthananyothertoe,thebaseofthenaturallogarithms.static doublePIThedoublevaluethatiscloserthananyothertopi,theratioofthecircumferenceofacircletoitsdiameter.成员方法static doubleabs(double a) Retu
2、rnstheabsolutevalueofadoublevalue.static floatabs(float a) Returnstheabsolutevalueofafloatvalue.static intabs(int a) Returnstheabsolutevalueofanintvalue.static longabs(long a) Returnstheabsolutevalueofalongvalue.static doubleceil(double a)
3、 Returnsthesmallest(closesttonegativeinfinity)doublevaluethatisnotlessthantheargumentandisequaltoamathematicalinteger.static doublecos(double a) Returnsthetrigonometriccosineofanangle.static doubleexp(double a) Returnstheexponentialnumbere(i.e.,2.71
4、8...)raisedtothepowerofadoublevalue.static doublefloor(double a) Returnsthelargest(closesttopositiveinfinity)doublevaluethatisnotgreaterthantheargumentandisequaltoamathematicalinteger.static doublelog(double a) Returnsthenaturallogarithm(basee)ofadouble
5、value.static doublemax(double a,double b) Returnsthegreateroftwodoublevalues.static floatmax(float a,float b) Returnsthegreateroftwofloatvalues.static intmax(int a,int b) Returnsthegreateroftwointvalues.static longmax(long a,long b) Re
6、turnsthegreateroftwolongvalues.static doublemin(double a,double b) Returnsthesmalleroftwodoublevalues.static floatmin(float a,float b) Returnsthesmalleroftwofloatvalues.static intmin(int a,int b) Returnsthesmalleroftwointvalues.static longmin(l
7、ong a,long b) Returnsthesmalleroftwolongvalues.static doublepow(double a,double b) Returnsofvalueofthefirstargumentraisedtothepowerofthesecondargument.static doublerandom() Returnsadoublevaluewithapositivesign,greaterthanorequalto0.0andlessthan
8、1.0.static longround(double a) Returnstheclosestlongtotheargument.static intround(float a)