Here you can find the source of max(int x, int y)
Parameter | Description |
---|---|
x | Value 1 |
y | value 2 |
public static int max(int x, int y)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w w w . j a va2s . co m*/ * Get maximum of two given values * * @param x Value 1 * @param y value 2 * @return Max of the two values */ public static int max(int x, int y) { return (x > y) ? x : y; } /** * Get maximum of two given values * * @param x Value 1 * @param y value 2 * @return Max of the two values */ public static double max(double x, double y) { return (x > y) ? x : y; } }