이것은 후속 질문입니다. Why is this exception is not printed? Why it's showing an error?
아래의 코드에서 ArithmeticException이 트리거되지 않는 이유는 무엇입니까? 어떤 일이 발생여기서 예외가 트리거되지 않는 이유는 무엇입니까?
Its not gonna printed a=Infinity
다음과 같이
class Exp
{
public static void main(String args[])
{
float d,a=1;
try
{
d=0;
a=44/d; //no exception triggered here.. why?
System.out.print("Its not gonna printed a="+a);
}
catch(ArithmeticException e)
{
System.out.println("Print exception"+e);
}
}
}
대신 출력이 온다?