Math.max(12.123, 12.456)

참고 자료

https://www.tutorialspoint.com/java/number_max.htm