1Z0-829 · domain
Utilizing Java Object-Oriented Approach
Practise Oracle Certified Professional Java SE 17 Developer 1Z0-829 Utilizing Java Object-Oriented Approach practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.
Focused practice
Practice Utilizing Java Object-Oriented Approach questions
Scored sessions drawing only from this domain — pick a length below.
Start 20-question practice test →What this domain covers
What to know about Utilizing Java Object-Oriented Approach
Utilizing Java Object-Oriented Approach questions test whether you can apply the concept in context, not just recognise a definition.
How the topic appears in realistic exam-style scenarios.
Which detail in the question changes the correct answer.
How to eliminate plausible but wrong options.
How to connect the question back to the wider exam objective.
Watch out for
Common Utilizing Java Object-Oriented Approach exam traps
- ▸Answering from memory before reading the full scenario.
- ▸Missing a constraint such as cost, availability, security, scope or command context.
- ▸Choosing a broad answer when the question asks for the most specific fix.
- ▸Ignoring why the wrong options are tempting.
Question index
All Utilizing Java Object-Oriented Approach questions (31)
Click any question to see the full explanation, or start a practice session above.
Refer to the exhibit. What is the result of compiling and running the Test class?
Hard2Refer to the exhibit. What is the result of compiling and running the Main class?
Medium3Refer to the exhibit. What is the output?
Medium4Given a record `Point(int x, int y)`, which statement is true about the automatically generated constructor?
Hard5Arrange the steps to override equals() and hashCode() correctly in Java.
Medium6Match each functional interface to its abstract method signature.
Medium7Which two statements are true about records in Java? (Choose two.)
Medium8You are designing a logging framework for a distributed application. The framework must support multiple output destinations (console, file, network socket) and allow clients to dynamically add new destinations at runtime without modifying existing code. Currently, the application uses a single static Logger class with methods like logToConsole(String msg) and logToFile(String msg). The team needs to refactor the code to adhere to the Open/Closed Principle and support extensibility. After reviewing the requirements, you propose using a combination of an interface and a strategy pattern. However, a senior developer argues that using a simple enum with abstract methods would be sufficient. Which course of action best adheres to object-oriented design principles and allows the most flexibility for future extensions?
Easy9Which statement about the code is correct?
Hard10Which TWO access modifiers can be applied to a top-level class in Java? (Choose two.)
Easy11A class `Transaction` is declared as `sealed`. Which statement correctly implements a permitted subclass?
Hard12Refer to the exhibit. What is the output?
Hard13Given the exhibit, which statement about calling this method is true?
Medium14Refer to the exhibit. What is the output?
Hard15Refer to the exhibit. Given the following code: ```java 1: sealed interface Shape permits Circle { } ... 10: class Circle implements Shape { } ``` What is the result?
Medium16Refer to the exhibit. What is the result?
Hard17Refer to the exhibit. Which statement about this Singleton implementation is correct?
Hard18A class `Account` has a method `public void deposit(double amount)`. Which approach correctly demonstrates method overloading?
Easy19A financial services company runs a Java 17 Spring Boot application that processes real-time stock trades. The application uses a class `TradeProcessor` containing a method `void process(Trade trade)`. This method is invoked by multiple threads concurrently. The `Trade` class is immutable and has fields like `String symbol`, `int quantity`, `double price`. The `TradeProcessor` method updates a shared `HashMap<String, Double>` that tracks the average price per symbol. The update logic is: retrieve the current average for the symbol, compute a new average, and put it back. During high-load testing, the average prices are occasionally incorrect. The development team suspects a race condition. Which course of action should be taken to fix the issue with minimal performance impact?
Hard20Which design pattern is best suited for creating a family of related objects without specifying their concrete classes?
Medium21A developer needs to ensure that a class `Shape` cannot be instantiated but can be extended. Which modifier should be used?
Medium22Refer to the exhibit. What is the most direct way to fix the compilation error without changing the access modifier of the field?
Hard23Which TWO statements are true about the sealed class feature in Java 17?
Hard24Given the following code snippet: `List<Integer> list = new ArrayList<>(); list.add(10); list.add(20); list.remove(1); System.out.println(list);` What is the output?
Easy25What is a key difference between a class and an interface in Java?
Hard26You are designing a logging framework for a microservices application. The framework must support multiple output destinations (console, file, database) and allow new destinations to be added without modifying existing code. Additionally, each destination should be able to format the log message differently. The team prefers composition over inheritance. Which design pattern should you recommend?
Easy27A developer writes a class `Employee` with a private field `salary`. Which approach correctly allows subclasses to access `salary` directly without breaking encapsulation?
Medium28Which TWO statements about Java interfaces are true? (Choose two.)
Hard29Which THREE conditions must be true for a method to override another method in a subclass? (Choose three.)
Medium30Refer to the exhibit. Two Java classes are defined as shown. What is the output when the Sub class is executed?
Medium31Refer to the exhibit. What is the result?
HardOther domains
All 1Z0-829 exam domains
Frequently asked questions
- What does the Utilizing Java Object-Oriented Approach domain cover on the 1Z0-829 exam?
- Utilizing Java Object-Oriented Approach questions test whether you can apply the concept in context, not just recognise a definition.
- How many questions are in this domain?
- This page lists all 31 Utilizing Java Object-Oriented Approach questions in the 1Z0-829 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
- What is the best way to practise this domain?
- Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
- Can I practise only Utilizing Java Object-Oriented Approach questions?
- Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.