Java Number Max Value max(T v1, T v2)

Here you can find the source of max(T v1, T v2)

Description

max

License

Apache License

Declaration

public static <T extends Comparable<T>> T max(T v1, T v2) 

Method Source Code

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

public class Main {
    public static <T extends Comparable<T>> T max(T v1, T v2) {
        return v1.compareTo(v2) < 0 ? v2 : v1;
    }/*from  w  w  w .  j a  v a 2 s .c  o  m*/
}

Related

  1. max(String s)
  2. max(T a, T b)
  3. max(T a, T b)
  4. max(T c1, T c2)
  5. max(T c1, T c2)
  6. max(T v1, T v2, int nullSupport)
  7. max2(double a, double b)
  8. max2(int a, int b)
  9. max255(float val)