Java BigDecimal max() methodThe max() method of java BigDecimal class is used to obtain a maximum value between BigDecimal and val. Syntax:Parameter:Val: value with which the maximum is to be computed. Exception:No Returns:It returns maximum value between two BigDecimal values. In case if both are equal, first BigDecimal will be returned. Example 1Test it NowOutput: Max Value among 152207 and 152208 is = 152208 Example 2Test it NowOutput: Max Value among -55 and -44 is = -44 Example 3Test it NowOutput: Max Value among 145 and 145 is = 145 Example 4Test it NowOutput: Max Value among 678.4008 and 678.4009 is = 678.4009 Next TopicJava BigDecimal |
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