Description Of BigInteger: divide(BigInteger val)
The 
java.math.BigInteger.divide(BigInteger val) returns a BigInteger whose value is (this / val).
Code Example Java BigInteger
import java.math.BigInteger;
public class CodeFromDoesystem {
 public static void main(String[] args) throws Exception {
  BigInteger bi1 = new BigInteger("4");
  BigInteger bi2 = new BigInteger("2");
  System.out.println(bi1.divide(bi2)); // output : 2 (4 / 2)
  System.out.println(bi2.divide(bi1)); // output : 0 (2 / 4)
  System.out.println(bi1); // output : 4
  System.out.println(bi1.divide(BigInteger.valueOf(4))); // output : 1
 }
}
 
ไม่มีความคิดเห็น :
แสดงความคิดเห็น