Example usage for java.math BigInteger max

List of usage examples for java.math BigInteger max

Introduction

In this page you can find the example usage for java.math BigInteger max.

Prototype

public BigInteger max(BigInteger val) 

Source Link

Document

Returns the maximum of this BigInteger and val .

Usage

From source file:Main.java

public static void main(String[] args) {

    BigInteger bi1 = new BigInteger("123");
    BigInteger bi2 = new BigInteger("1000");

    // assign the max value of bi1, bi2 to bi3
    BigInteger bi3 = bi1.max(bi2);

    System.out.println(bi3);/*from   w w  w .  j a va 2 s .com*/
}