Java Number Min Value min(int x, int y)

Here you can find the source of min(int x, int y)

Description

Get minimum of two given values

License

Open Source License

Parameter

Parameter Description
x Value 1
y value 2

Return

Min of the two values

Declaration

public static int min(int x, int y) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//  w  ww .  ja  v  a  2 s . c o  m
     * Get minimum of two given values
     * 
     * @param x Value 1
     * @param y value 2
     * @return Min of the two values
     */
    public static int min(int x, int y) {
        return (x < y) ? x : y;
    }

    /**
     * Get minimum of two given values
     * 
     * @param x Value 1
     * @param y value 2
     * @return Min of the two values
     */
    public static double min(double x, double y) {
        return (x < y) ? x : y;
    }
}

Related

  1. min(int number1, int number2)
  2. min(int one, int two, int three)
  3. min(int value, int min)
  4. min(int x, int x2, int x3)
  5. min(int x, int y)
  6. min(Integer a, Integer b)
  7. min(Integer i1, Integer i2)
  8. min(long m, long n)
  9. min(long x, long y)