Question 728: public class Outer { public void someOuterMethod() { //Line 5 } public class Inner { } public static void main(String[] argv) { Outer ot = new Outer(); //Line 10 } }Which of the following code fragments inserted, will allow to compile?
tcs
wipro
infosys
general
aptitude
declarations-and-access-contro
java-programming
Option A compiles without problem.Option B gives error - non-static variable cannot be referenced from a static context.Option C packageotdoes not exist.Option D gives error - non-static variable cannot be referenced from a static context.