Java Number Max Value max(int a, int b, int c)

Here you can find the source of max(int a, int b, int c)

Description

Returns the greater of three int values.

License

Open Source License

Parameter

Parameter Description
a The first int value to compare.
b The second int value to compare.
c The third int value to compare.

Return

The greater of the three int values.

Declaration

public static int max(int a, int b, int c) 

Method Source Code

//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;
    }
}

Related

  1. max(int a, int b)
  2. max(int a, int b)
  3. max(int a, int b, int c)
  4. max(int a, int b, int c)
  5. max(int a, int b, int c)
  6. max(int a, int b, int c)
  7. max(int a, int b, int c, int d)
  8. max(int a, int b, int c, int d)
  9. max(int i, int j)