Multiple choice technology programming languages

This is a legal way to create an instance of an inner class: OuterClass.InnerClass x=new OuterClass().InnerClass();

  1. True

  2. False

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

To instantiate a non-static inner class, you must invoke the constructor on an instance of the outer class using the syntax new OuterClass().new InnerClass(), rather than calling InnerClass() directly on the outer class instance.