I have read that superclass object can point to subclass object but does not know about the content of subclass . Then how can superclass can catch exception of type subclass ?
I am confused here . Please someone help
class abc {
public static void main(String k[]) {
try {
int a = 0;
int b = 56 / 0;
} catch (Exception e) {
System.out.println(" divide by zero ");
}
}
}