Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

math.min java

                   // FROM geeksforgeeks.com //
// two double data-type numbers are passed as argument
public class Gfg {
 
    public static void main(String args[])
    {
        double a = 12.123;
        double b = 12.456;
        // prints the minimum of two numbers
        System.out.println(Math.min(a, b));
        System.out.println(Math.max(a, b)); // prints max of the two numbers
    }
}
 
PREVIOUS NEXT
Tagged: #java
ADD COMMENT
Topic
Name
5+8 =