Loading…
Loading…
Ten exam-style questions on declaring constructors, when the default constructor exists, private constructors, chaining with this(), calling parent constructors with super(), the inserted super() call, the order constructor bodies run in, and Java 25 flexible constructor bodies, with explanations.
Practice questions for the article Java Constructors: Default Constructor, this() and super().
The questions follow Java 21 rules, as on the 1Z0-830 exam. For every constructor without an explicit this() or super(), write the inserted super(); in yourself before deciding whether it compiles. Aim for at least 8 out of 10 before moving on.
Quiz path: step 37. Take the quizzes in this order, after reading each article.
Previous quiz: Inheritance, Class Modifiers, this and super (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.