This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
When you cast Float.POSITIVE_INFINITY down to int it will be masked to Integer.MAX_VALUE. And Float.NEGATIVE_INFINITY will be masked to Integer.MIN_VALUE. And Float.NaN will be masked to 0. This also works for Double and Long.