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








Syntax

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

public static float min(float a, float b)

Example

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

//from  w w  w  . j  a v a 2 s  .co m
public class Main {

  public static void main(String[] args) {
  
    float f1 = 51 , f2 = 110, f3 = -125;
     
    System.out.println(StrictMath.min(f1, f2));
        
    System.out.println(StrictMath.min(f1, f3));    
  }
}

The code above generates the following result.