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

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

Description

max

License

Apache License

Declaration

public static int max(int a, int b) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int max(int a, int b) {
        if (a > b)
            return a;
        else//from   ww  w.  j  av  a  2s . c o  m
            return b;
    }

    public static double max(double a, double b) {
        if (a > b)
            return a;
        else
            return b;
    }

    public static int max(int a, int b, int c) {
        if (a > b) {
            if (a > c)
                return a;
            else
                return c;
        } else {
            if (b > c)
                return b;
            else
                return c;
        }
    }

    public static double max(double a, double b, double c) {
        if (a > b) {
            if (a > c)
                return a;
            else
                return c;
        } else {
            if (b > c)
                return b;
            else
                return c;
        }
    }
}

Related

  1. max(float dirOffset, float min, float max)
  2. max(float value1, float value2)
  3. max(float value1, float value2)
  4. max(float x0, float x1)
  5. max(int a, int b)
  6. max(int a, int b)
  7. max(int a, int b)
  8. max(int a, int b)
  9. max(int a, int b)