12345678910111213141516171819202122232425262728293031323334353637383940414243package _22javacoreclass;import java.security.SecureRandom;public class Main4 { public static void main(String[] args){ // 绝对值 System.out.println(Math.abs(-100)); System.out.println(Math.abs(-7.8)); //最大值最小值 System.out.println(Math.max(100,99)); System.out.println(Math.min(1.2,2.3)); //计算xy次方 System.out.println(Math.pow(2, 10)); //计算√x System.out.println(Math.sqrt(2)); //计算ex次方 System.out.println(Math.exp(2)); //计算以e为底的对数 System.out.println(Math.log(4)); //计算以10为底的对数 System.out.println(Math.log10(100)); //三角函数 System.out.println(Math.sin(3.14)); System.out.println(Math.cos(3.14)); System.out.println(Math.tan(3.14)); System.out.println(Math.asin(1.0)); System.out.println(Math.acos(1.0)); //数学常量 System.out.println(Math.PI); System.out.println(Math.E); System.out.println(Math.sin(Math.PI / 6)); //随机数 System.out.println(Math.random()); System.out.println(Math.asin(1.0)); System.out.println(Math.asin(1.0)); System.out.println(Math.asin(1.0)); //真随机数 SecureRandom sr = new SecureRandom(); System.out.println(sr.nextInt(100)); }}