Comparing Infinities in Java
<p>What does the following expression return in Java?</p>

<pre><code>Math.max(Float.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);
</code></pre>

<p>I saw this question in a website and the answer is <code>Double.POSITIVE_INFINITY</code>.  I'm not sure about this answer as how can we compare 2 infinities? Can someone clarify this?  Thanks.</p>
