math maximum java

Java
Math.max(a, b);

// a & b = int, double, float, or long
Source

Also in Java: