Description Of BigDecimal: min(BigDecimal val)
The java.math.BigDecimal.min(BigDecimal val) returns the minimum of this BigDecimal and val.BigDecimal.min(BigDecimal val) method returns the BigDecimal whose value is the lesser of this BigDecimal and val . If they are equal, as defined by the compareTo method, this is returned.
Code Example Java BigDecimal
import java.math.BigDecimal; public class BigDecimalExam { public static void main(String[] args) { BigDecimal bg1 = new BigDecimal("-75"); BigDecimal bg2 = new BigDecimal("25"); BigDecimal bg3 = bg1.min(bg2); System.out.println(bg3); } }
ไม่มีความคิดเห็น :
แสดงความคิดเห็น