Back to Multiple Choice Quiz
Generic Max Method
Java quiz · Question 32What does this generic method return when called as max(3, 7)?
Code
1public static <T extends Comparable<T>> T max(T a, T b) {2 return (a.compareTo(b) >= 0) ? a : b;3}