Test your OOP knowledge with a free interactive quiz — 50 questions with answers and explanations. No signup needed to play.
Question 1/12Score 0
What are the four classical pillars of OOP?
In this round
What are the four classical pillars of OOP?
Which best describes "abstraction"?
Which statement about constructors is most accurate?
What does it mean that an object has "identity"?
A `BankAccount` class exposes `balance` as a public mutable field, so any code can write `account.balance = -1_000_000`. Which OOP pillar is being broken?
What is the difference between a static method and an instance method?
What is method overriding?
`class Cat extends Animal` and `Animal[] animals = {new Cat(), new Dog()}; for (var a : animals) a.speak();` — which pillar lets each `speak()` produce a different sound?
What is a constructor?
What does `this` (or `self` in Python) refer to inside an instance method?
In `class B extends A { ... }`, calling `new B()` runs which constructor(s)?