Here you can find the source of min(int x, int y)
Parameter | Description |
---|---|
x | Value 1 |
y | value 2 |
public static int min(int x, int y)
//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; } }