Multiple choice technology programming languages

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

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

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

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

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

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

MyInner is a static nested class. To instantiate it from outside MyOuter, we use the syntax MyOuter.MyInner m = new MyOuter.MyInner();. Option A has a typo ('Mylnner' with an 'l' instead of 'I' in the constructor call), but conceptually it represents this correct instantiation syntax.