Loading…
Loading…
Ten exam-style questions on local variable modifiers, deferred final assignment, final references, effectively final variables in lambdas, final instance fields, and declaring and calling varargs methods, with explanations.
Practice questions for the article Java Local and Instance Variables, Effectively Final and Varargs.
The questions follow Java 21 rules, as on the 1Z0-830 exam. For each local variable, count how many times it is assigned before deciding whether it's effectively final. Aim for at least 8 out of 10 before moving on.
Quiz path: step 30. Take the quizzes in this order, after reading each article.
Previous quiz: Method Declarations (OCP 21)
Next quiz: Access Modifiers (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.