Math: min(int value1, int value2)
/* * Output: Min of -8 and -4 is -8 */ public class MainClass { public static void main(String args[]) { System.out.println("Min of -8 and -4 is " + Math.min(-8, -4)); } }