Here you can find the source of max(long a, long b)
public final static long max(long a, long b)
//package com.java2s; //License from project: Apache License public class Main { /** @return The maximum of a and b. */ public final static long max(long a, long b) { return a > b ? a : b; }/*from w w w. java 2 s. c o m*/ /** @return The maximum of a, b and c. */ public final static long max(long a, long b, long c) { return max(a, max(b, c)); } /** @return The maximum of a and b. */ public final static int max(int a, int b) { return a > b ? a : b; } /** @return The maximum of a, b and c. */ public final static int max(int a, int b, int c) { return max(a, max(b, c)); } /** @return The maximum of the array a. */ public final static int max(int[] a) { int result = Integer.MIN_VALUE; for (int i = 0; i < a.length; i++) if (a[i] > result) result = a[i]; return result; } /** @return The maximum of the array a. */ public final static double max(double[] a) { double result = Double.MIN_VALUE; for (int i = 0; i < a.length; i++) if (a[i] > result) result = a[i]; return result; } }