Given the uncompleted code of a class: 1: public class A{ 2: public void baz( ){ 3: System.out.println(“A”);}} 4: class B extends A{ 5: public static void main(String[] args){ 6: A a=new B( ); 7: a.baz( );} 8: public void baz( ){ 9: System.out.println(“B”);}} What will happen when you compile and run this program?
A.
The program compiles, runs, and displays A in the standard output.
B.
The program compiles, runs, and displays B in the standard output.
C.
The program compiles, but throws a runtime exception.
D.
The program does not compile.