Math: min(double a, double b) : Math « java.lang « Java by API
- Java by API
- java.lang
- Math
Math: min(double a, double b)
public class Main {
public static void main(String[] args) {
double enrollmentPrice = 45.875;
double closingPrice = 54.375;
System.out.println("Your purchase price is: $"
+ Math.min(enrollmentPrice, closingPrice));
}
}
Related examples in the same category