Java BigInteger max() MethodThe max() method of Java BigInteger class is used to get the maximum value of the two BigInteger objects. This method returns the BigInteger whose value is greater of this BigInteger and the val method argument. Syntax:Parameter:val - value with which the maximum is to be computed. Exception:NA Returns:This method returns the BigInteger whose value is the greater between this and val.
Example 1Test it NowOutput: Maximum value among 12345 and 12345 is 12345 Example 2Test it NowOutput: Maximum value among 100 and 10 is 100 Example 3Test it NowOutput: Maximum value among -100 and -10 is -10 Next TopicJava BigInteger |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India