Java object-oriented approach

10 practice questions under this official exam objective (1Z0-819), each with the answer key, an option-by-option explanation and instant feedback.

Questions under this objective

10 total · page 1 of 1
1Z0-829 S-grade

Java Sealed Interfaces Compilation Rules

This question tests the strict syntax requirements for Java sealed interfaces, specifically the mandatory modifiers (sealed, non-sealed, or final). It

9 comments
1Z0-819 S-grade

What Output Does This Java Program Print for Manager AA?

A Java program builds a Manager named AA that has no manager of its own but holds two Employee reports, and relies on an overridden toString() to rend

6 comments
1Z0-829 A-grade

Java Record Static Field Compilation Fix

This question tests the rule that Java records cannot have non-static instance fields. Replacing the initialization with a static variable is the corr

5 comments
1Z0-829 A-grade

Java instanceof Pattern Matching and Method Invocation

This Java 17 exam question tests the interaction between instanceof pattern matching, variable binding, and polymorphic method calls. It establishes t

5 comments
1Z0-829 A-grade

Java Reference Assignment and Null Handling

This question tests Java reference assignment behavior, specifically how multiple variables can point to the same object instance. The correct answer

4 comments
1Z0-829 A-grade

Java Method Overloading Resolution by Declared Type

This Java 17 exam question tests the rule that method overloading is resolved at compile time based on the declared type of arguments, not their runti

4 comments
1Z0-829 A-grade

Java Parameter Shadowing and this Keyword

This question tests Java's parameter shadowing rules where a local variable hides an instance field. The correct answer is C because the final println

4 comments
1Z0-819 A-grade

Java Bean Bound Property Change Notification

This question tests the behavior of Java Beans bound properties using PropertyChangeSupport. It establishes that listeners are notified with the new v

3 comments
1Z0-819 A-grade

Which Overload Runs for the Binary Literal 0B1010_1010_0101_1001_0110?

A binary literal such as 0B1010_1010_0101_1001_0110 with underscores but no L suffix is typed as an int, so a call to an overloaded method binds to th

3 comments
1Z0-829 A-grade

Java Interface Static and Private Method Invocation

This Java SE 8+ question tests the ability to invoke static and private methods defined within an interface. The correct answer identifies the valid s

3 comments