Java Double min() MethodThe min() method of Java Double class returns the double having minor value amongst two double values. The result returned is same as by invoking Math.min () method. SyntaxParametersHere, a & b are the two operands to be compared. Return valueThe min() method returns the lesser value amongst a and b. Example 1Output: Enter first number. 67.90 Enter second number 67.89 Enter third number 67.99999 The smaller number is: 67.89 Example 2Output: Enter total number of elements 4 Enter 4 elements 100.098 100.9876 19635 100 Maximum value : 19635.0 Minimum value : 100.098 Example 3Output: Enter number of elements you want. 4 Enter elements 10.000 10,001 11 12 Descending order = 10001.0>12.0>11.0>10.0> Example 4Output: Min_Value = 4.9E-324 Min_Value = 2.2250738585072014E-308 1. Smaller value = 4.9E-324 POSITIVE_INFINITY = Infinity NEGATIVE_INFINITY = -Infinity 2. Smaller value = -Infinity Next TopicJava-double-parsedouble-method |
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