Multiple choice technology programming languages

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

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

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

  3. MyOuter m = new MyOuter();

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

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To instantiate a static nested class from outside its enclosing class, you must qualify the nested class name with the outer class name, using the syntax Outer.Inner obj = new Outer.Inner(). Other options fail due to missing qualifiers.