Object Oriented Programming (OOPs)
© examsiri.com
Question : 70 of 72
Marks:
+1,
-0
Given:
Which, inserted at line 9, will compile? (Choose all that apply.)
1. class Dog { }
2. class Beagle extends Dog { }
3.
4. class Kennel {
5.   public static void main(String [] arfs) {
6.    Beagle b1 = new Beagle();
7.    Dog dog1 = new Dog();
8.    Dog dog2 = b1;
9.    /*insert code here*/
10.  }
11. }Which, inserted at line 9, will compile? (Choose all that apply.)
Go to Question: