Here you can find the source of max(int a, int b, int c)
Parameter | Description |
---|---|
a | The first int value to compare. |
b | The second int value to compare. |
c | The third int value to compare. |
public static int max(int a, int b, int c)
//package com.java2s; //License from project: Open Source License public class Main { /**/* ww w . j a v a 2 s.co m*/ * Returns the greater of three {@code int} values. That is, the result is * the argument closer to the value of {@link Integer#MAX_VALUE}. If the * arguments have the same value, the result is that same value. * * @param a The first {@code int} value to compare. * @param b The second {@code int} value to compare. * @param c The third {@code int} value to compare. * @return The greater of the three {@code int} values. */ public static int max(int a, int b, int c) { int first = Math.max(a, b); int value = Math.max(first, c); return value; } }