MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / max

Method max

src/main/java/com/thealgorithms/maths/MaxValue.java:15–17  ·  view source on GitHub ↗

Returns the greater of two int values. That is, the result is the argument closer to the value of Integer#MAX_VALUE. If the arguments have the same value, the result is that same value. @param a an argument. @param b another argument. @return the larger of a and b.

(int a, int b)

Source from the content-addressed store, hash-verified

13 * @return the larger of {@code a} and {@code b}.
14 */
15 public static int max(int a, int b) {
16 return a >= b ? a : b;
17 }
18}

Callers 15

maxTestMethod · 0.95
analyticalUnderdampedMethod · 0.45
findKCentersMethod · 0.45
calculateLatenessMethod · 0.45
addBinaryMethod · 0.45
mergeMethod · 0.45
maxProfitMethod · 0.45
miniMaxMethod · 0.45

Calls

no outgoing calls