(Choose 1 answer)
What happens if the following code compile and run?
abstract class A {
void fun() {}
final void foo() {System.out.println("foo");}}
class B extends A {
void fun() {System.out.println("B");}final void foo() {System.out.println("BB");}}
class Main {
public static void main(String args[]){A t = new B(); t.fun(); t.foo();System.out.println();}
A. An error is thrown when the program is compiled.
B. The output is BBB
C. The output is fooBB
D. The program executes with no output.
Q: 10