「a」の値を出力しようとすると、エラーが表示されるのはなぜですか? 例外がエラーになったのはなぜですか?
class Ankit1
{
public static void main(String args[])
{
float d,a;
try
{
d=0;
a=44/d;
System.out.print("It's not gonna print: "+a); // if exception doesn't occur then it will print and it will go on to the catch block
}
catch (ArithmeticException e)
{
System.out.println("a:" + a); // why is this an error??
}
}
}