In this example we will show you how to use math.min(x,y) to return the lowest value of x and y in Java.
Source Code
package com.beginner.examples;
public class Min {
public static void main(String[] args) {
System.out.println(Math.min(3, 7)); // return the lowest value
}
}
Output:
3