Loading…
Loading…
Ten exam-style questions on inner classes, the outer.new Inner() syntax, Outer.this, static nested classes, implicitly static nested records, enums and interfaces, modifiers and access between outer and nested classes, with explanations.
Practice questions for the article Java Nested Classes: Inner Classes and Static Nested Classes.
For every new of a nested class, ask: is the class static, and if not, which outer object does it attach to? Aim for at least 8 out of 10.
Quiz path: step 49. Take the quizzes in this order, after reading each article.
Previous quiz: Record Patterns (OCP 21)
Next quiz: Local and Anonymous Classes (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.