package com.sxt.utils.math; /* * Math类 */ public class TestMath { public static void main(String[] args) { System.out.println(Math.ceil(5.2));//向上取整 6.0 System.out.println(Math.floor(5.2));//向下取整5.0 System.out.println(Math.max(5.2,4));//两个数的最大值 System.out.println(Math.min(1,8.8));//两个数的最小值 } }