Loading…
Loading…
Ten exam-style questions on local classes, effectively final captures, anonymous classes extending classes and implementing interfaces, the trailing semicolon, local records, and lambdas versus anonymous classes, with explanations.
Practice questions for the article Java Local and Anonymous Classes.
For every local variable used inside a local or anonymous class, scan the whole method for a reassignment. Aim for at least 8 out of 10.
Quiz path: step 50. Take the quizzes in this order, after reading each article.
Previous quiz: Inner and Static Nested Classes (OCP 21)
Next quiz: Polymorphism and Casting (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.