public class MyOuter { public static class MyInner { public static void foo() { } } } which statement, if placed in a class other than MyOuter or MyInner, instantiates an instance of the nested class? - Study24x7
Social learning Network
study24x7

Default error msg

Login

New to Study24x7 ? Join Now
Already have an account? Login
02 Mar 2023 04:07 PM study24x7 study24x7

public class MyOuter { public static class MyInner { public static void foo() { } } } which statement, if placed in a class other than MyOuter or MyInner, instantiates an instance of the nested class?

A

MyOuter.MyInner m = new MyOuter.MyInner();

B

MyOuter.MyInner mi = new MyInner();

C

MyOuter m = new MyOuter();MyOuter.MyInner mi = m.new MyOuter.MyInner();

D

MyInner mi = new MyOuter.MyInner();

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles