1. class A { 2. public A() { 3. System.out.println(“hello from a”); 4. } 5. } 6. class B extends A { 7. public B () { 8. System.out.println(“hello from b”); 9. super(); 10 } 11. } 12. public class Test { 13. public static void main(String args[]) { 14. A a = new B(); 15. } 16. }
Show comments for this question (1) Add comments Link to this question