when i run the below code, it give the output "Arithmetic exception". Since the Arithmetic Exception is checked Exception, so it has higher priority than unchecked exception. But how does it distinguishes between object and Arithmetic exception?
public class Solution {
public static void a(Exception e)
{
System.out.println("Exception");
}
public static void a(ArithmeticException ae)
{
System.out.println("ArithmeticException");
}
public static void a(Object o)
{
System.out.println("Object");
}
public static void main(String[] args)
{
a(null);
}
}