The min()  method of Integer class returns the smaller of two int values. It returns the same result as by calling Math.min.

 Syntax

public static int min(int a, int b)

Parameters

The parameters ‘a’ and ‘b’ represent the first and second operand.

 Return Value

This method returns the smaller of ‘a’ and ‘b’.

Example 1

Output

Example 2

Output

Example 3

Output

Pin It on Pinterest

Share This