Following code will result in: class A { public static void main(String [] args) {B b = new A(); }} class B extends A {}
Compile error
Runtime Exception
No error
Compile error. Type mismatch: cannot convert from A to B