math.max method in java code example Example: math maximum java Math.max(a, b); // a & b = int, double, float, or long