Description Of BigInteger: min(BigInteger val)
The java.math.BigInteger.min(BigInteger val) returns the minimum of this BigInteger and val.BigInteger.min(BigInteger val)method returns the BigInteger whose value is the lesser of this BigInteger and val . If they are equal, either may be returned.
Code Example Java BigInteger
import java.math.BigInteger;
public class BigIntegerExam {
public static void main(String[] args) {
BigInteger bi1 = new BigInteger("2");
BigInteger bi2 = new BigInteger("3");
BigInteger bi3 = bi1.min(bi2);
System.out.println(bi3);
System.out.println(bi3.equals(bi1));
}
}
ไม่มีความคิดเห็น :
แสดงความคิดเห็น