Why is it that division of an integer by 0 gives ArithmeticException whereas division of a non-zero double or float by 0,prints Infinity. Also division of an int 0 by 0 gives ArithmeticException whereas division of a double or float 0 by 0 gives NaN(Not a number).
public class First
{
public static void main(String[] args)
{
System.out.println(10/0); //Arithmetic Exception
System.out.println(10.0/0); //Prints Infinity
}
}