title: double d=1/0.0 vs double d=1/0
body: <pre><code>double d=1/0.0;
      System.out.println(d);
  </code></pre>
  
  <p>It prints <code>Infinity</code> , but if we will write <code>double d=1/0;</code> and print it we'll get this exception: <code>Exception 
  in thread "main" java.lang.ArithmeticException: / by zero
      at D.main(D.java:3)</code> Why does Java know in one case that diving by zero is infinity but for the int 0 it is not defined?
  In both cases d is double and in both cases the result is infinity. </p>