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

Warning: include(./views/auth.php): failed to open stream: Permission denied in /var/www/html/live/loginRightSlider.php on line 18

Warning: include(): Failed opening './views/auth.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/live/loginRightSlider.php on line 18

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
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