catching infinity value in simple calculator
<p>I'm making a simple calculator for this homework.
Java is returning Infinity when divided by 0</p>

<p>I need to display some error message, when I get infinity. The problem is I don't know how to do the condition</p>

<pre><code>double result;
result = 4/0;
//if result == infinity then some message - need help with this
</code></pre>
