Object Oriented Programming (OOPs)

© examsiri.com
Question : 71 of 72
 
Marks: +1, -0
Given the following,
1. class X { void do1() { } }
2. class Y extends X { void do2() { } }
3.
4. class Chrome {
5.   public static void main(String [] args) {
6.    X x1 = new X();
7.    X x2 = new Y();
8.    Y y1 = new Y();
9.    /*insert code here*/
10.   }
11. }

Which, inserted at line 9, will compile? (Choose all that apply.)
Go to Question: