Question 15
Back to Exercise
Outer has a non-static inner class Inner. How do you create an Inner from static code?
- A new Inner()
- B outerObject.new Inner() Correct
- C Inner.create()
- D It is impossible
Correct Answer: Option B
Each Inner object is tied to an Outer object whose fields it can use.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!