title: Why does integer division by zero 1/0 give error but floating point 1/0.0 returns "Inf"?
body: <p>I'm just curious about this:</p>
  
  <p>When evaluating <code>1/0</code> in Java, the following exception occurs:</p>
  
  <blockquote>
    <p>Exception in thread "main"
    java.lang.ArithmeticException: / by
    zero
        at Foo.main(Foo.java:3)</p>
  </blockquote>
  
  <p>But <code>1/0.0</code> is evaluated to <code>Infinity</code>.</p>
  
  <pre><code>public class Foo {
      public static void main (String[] args) {
          System.out.println(1/0.0);
      }
  }
  </code></pre>
  
  <p>Why does this happen?</p>