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 ww  .ja v  a 2 s .  co 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.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable