

MCQOPTIONS
Saved Bookmarks
1. |
Which of the following code fragments inserted, will allow to compile? public class Outer { public void someOuterMethod() { //Line 5 } public class Inner { } public static void main(String[] argv) { Outer ot = new Outer(); //Line 10 } } |
A. | New Inner(); //At line 5 |
B. | New Inner(); //At line 10 |
C. | New ot.Inner(); //At line 10 |
D. | New Outer.Inner(); //At line 10 |
Answer» B. New Inner(); //At line 10 | |