Java Data Type Tutorial - Java StrictMath.min(int a, int b)








Syntax

StrictMath.min(int a, int b) has the following syntax.

public static int min(int a, int b)

Example

In the following code shows how to use StrictMath.min(int a, int b) method.

//  w w  w. ja  v  a 2  s  .  c o  m
public class Main {

  public static void main(String[] args) {
  
    int i1 = 110 , i2 = 180, i3 = -195;

    System.out.println(StrictMath.min(i1, i2));
        
    System.out.println(StrictMath.min(i1, i3));    
  }
}

The code above generates the following result.