hi
I have problem with the following code
import java.io.*;
class A {
A() throws Exception {
System.out.prinln ("Executing class A constructor");
throw new IOException();
}
}
public class B extends A {
B() throws Exception{
System.out.prinln ("Executing class B constructor");
}
public static void main (
String args[] ) {
try {
A a = new B();
} catch ( Exception e) {
System.out.println( e.getMessage() );
}
}
}
the o/p is
Executing class A constructor
null
My problem is why do i get null in o/p
Thanks in advance