Menu
Question Index
...

Which of the following code fragments, allows the program to compile? The code fragment should be included at the line numbers given next to it.

public class Outer
{
    public void someOuterMethod()
    {
        //LINE A
    }
    public class Inner { }

    public static void main(String[] argv)
    {
        Outer ot = new Outer();

        //LINE B
    }
}


new Inner(); //LINE B
new Inner(); //LINE A
new ot.Inner(); //LINE B
new Outer.Inner(); //LINE B
new ot.Inner(); //LINE A

Doubts

Problems

Topic: Unknown

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App