(Choose 1 answer)
Given the following Java code:
class A { void dojob1() {}}//1
class B extends A { void dojob2() {} } 1/2
// 3 class Robot { // 4
public static void main(String[] args){
A a1 = new A();Aa2 = new B();
B b1 = new B();
// insert some code here
// 6
117
// 8
//9
}
// 10
//11
//--
Which of the following, inserted at line 9, will compile?
A. a2.dojob2();
B. (B)a2.dojob2();
C. ((B)a2).dojob2();
D. None of the above statements will compile
//5
Exit 20