In C, there is a min() convenience macro that helps make the code more readable.
In java, the shortest equivalent I know of is:
(a > b ? b : a)
But it’s not as self-documenting as min() in my view.
Is there a built-in min() method in Java (and I just couldn’t find it)? or my only recourse is to define a method like this myself?
Math.min()? (Comes in several overloads for different types.)