Blog

When class B extends class A, which of the following is a valid statement?

1) A a = new b();

2) B b = new a();

3) A b = new a();

4) Bb = new b();