Loading…
Loading…
Ten exam-style questions on shared static fields, static access through references and null, static versus instance calls, static final constants, static initializers and their order, and static import syntax and name clashes, with explanations.
Practice questions for the article Java static Members, Static Initializers and Static Imports.
The questions follow Java 21 rules, as on the 1Z0-830 exam. Whenever a static member is used through a variable, replace the variable with its declared type before working out the answer. Aim for at least 8 out of 10 before moving on.
Quiz path: step 32. Take the quizzes in this order, after reading each article.
Previous quiz: Access Modifiers (OCP 21)
Next quiz: Pass-by-Value, Returning Objects and Autoboxing (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.