20+ practice questions focused on Object-Oriented Programming — one of the most tested topics on the Oracle Java Foundations 1Z0-811 exam. Each question includes a detailed explanation so you learn why the right answer is correct.
Start Object-Oriented Programming PracticeA developer writes a class 'Vehicle' with a method 'move()' that prints 'Vehicle moves'. A subclass 'Car' overrides 'move()' to print 'Car moves'. Given: Vehicle v = new Car(); v.move(); What is the output?
Explanation: Option D is correct because Java uses dynamic method dispatch (runtime polymorphism). Even though the reference variable is of type 'Vehicle', the actual object is a 'Car' instance. At runtime, the JVM calls the overridden 'move()' method of the 'Car' class, printing 'Car moves'.
In a banking application, a class 'Account' has a private field 'balance'. Which is the best way to allow subclasses to read but not directly modify 'balance'?
Explanation: Option B is correct because it follows the encapsulation principle of object-oriented programming. By providing a public getBalance() method, subclasses can read the balance value without having direct access to the private field, thus preventing unintended modification. This is the standard Java pattern for controlled access to private instance variables.
A class 'Base' has a method 'public void display() throws IOException'. Subclass 'Derived' overrides display(). Which exception specifications are allowed in the overriding method?
Explanation: In Java, an overriding method can throw the same exception, a subclass of the exception thrown by the parent method, or no exception at all. The parent method throws IOException, so the overriding method may throw FileNotFoundException (a subclass of IOException). This follows the rule that the overriding method cannot throw a broader checked exception than the overridden method.
Which design principle is violated by making all fields public in a class?
Explanation: Making all fields public violates the principle of encapsulation, which requires that an object's internal state be hidden from external access and only modifiable through controlled methods (getters/setters). In Java, public fields allow any class to directly read or modify the field, breaking data integrity and the ability to enforce invariants. Encapsulation is a core OOP concept that protects the internal representation of an object.
Given: abstract class Shape { abstract void draw(); } class Circle extends Shape { void draw() {} } Which is true?
Explanation: Option B is correct because Circle is a concrete class that extends the abstract class Shape, which declares the abstract method draw(). A concrete subclass of an abstract class must provide an implementation for all inherited abstract methods, unless the subclass is also declared abstract. Circle provides an implementation of draw() with an empty body, which satisfies the override requirement.
+15 more Object-Oriented Programming questions available
Practice all Object-Oriented Programming questions1. Baseline your knowledge
Start with 10 questions to gauge your current understanding of Object-Oriented Programming. This tells you whether you need a concept refresher or just practice.
2. Review every explanation
For each question — right or wrong — read the full explanation. Understanding why an answer is correct is more valuable than knowing the answer itself.
3. Focus on exam traps
Object-Oriented Programming questions on the 1Z0-811 frequently use trap wording. Look for subtle differences in answers that test your precision, not just general knowledge.
4. Reach 80% consistently
Do repeated sessions until you score 80%+ three times in a row. Then move to mixed-mode practice to test cross-topic recall under realistic conditions.
The exact number varies per candidate. Object-Oriented Programming is tested as part of the Oracle Java Foundations 1Z0-811 blueprint. Practicing with targeted Object-Oriented Programming questions ensures you can handle any format or difficulty that appears.
Yes. Courseiva provides free 1Z0-811 practice questions across all exam topics and domains. The platform includes topic-based practice, mock exams, missed-question review, bookmarked questions, and readiness tracking — no account required.
Difficulty is subjective, but Object-Oriented Programming is a high-priority exam concept tested in multiple ways — direct recall, scenario analysis, and command-output interpretation. Consistent practice is the best way to build confidence.
Launch a full Object-Oriented Programming practice session with instant scoring and detailed explanations.
Start Object-Oriented Programming Practice →