Courseiva
Knowledge + Practice
CertificationsVendorsCareer RoadmapsLabs & ToolsStudy GuidesGlossaryPractice Questions
C
Courseiva

Free IT certification practice questions with explained answers for CCNA, CompTIA, AWS, Azure, Google Cloud, and more.

Certification Practice Questions

CCNA practice questionsSecurity+ SY0-701 practice questionsAWS SAA-C03 practice questionsAZ-104 practice questionsAZ-900 practice questionsCLF-C02 practice questionsA+ Core 1 practice questionsGoogle Cloud ACE practice questionsCySA+ CS0-003 practice questionsNetwork+ N10-009 practice questions
View all certifications →

Product

CertificationsCertification PathsExam TopicsPractice TestsExam Dumps vs Practice TestsStudy HubComparisons

Company

AboutContactEditorial PolicyQuestion Writing PolicyTrust Center

Legal

Privacy PolicyTerms of Service

Courseiva is a free IT certification practice platform offering original exam-style practice questions, detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics for Cisco, CompTIA, Microsoft, AWS, and other technology certifications.

© 2026 Courseiva. Courseiva is operated by JTNetSolutions Ltd. All rights reserved.

Courseiva is an independent certification practice platform and is not affiliated with, endorsed by, or sponsored by Cisco, Microsoft, AWS, CompTIA, Google, ISC2, ISACA, or any other certification vendor. Vendor names and certification marks are used only to identify the exams learners are preparing for.

← Utilizing Java Object-Oriented Approach practice sets

1Z0-829 Utilizing Java Object-Oriented Approach • Complete Question Bank

1Z0-829 Utilizing Java Object-Oriented Approach — All Questions With Answers

Complete 1Z0-829 Utilizing Java Object-Oriented Approach question bank — all 0 questions with answers and detailed explanations.

26
Questions
Free
No signup
Certifications/1Z0-829/Practice Test/Utilizing Java Object-Oriented Approach/All Questions
Question 1mediummultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Refer to the exhibit. Two Java classes are defined as shown. What is the output when the Sub class is executed?

Exhibit

Refer to the exhibit.

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello");
    }
}

And the command:

$ javac Main.java
$ java Main

Output:
Hello

Now consider this class in another file:

public class Sub extends Main {
    public static void main(String[] args) {
        System.out.println("World");
    }
}

Compiled and run:

$ java Sub

What is the output?
Question 2hardmulti select
Read the full Utilizing Java Object-Oriented Approach explanation →

Which TWO statements are true about the sealed class feature in Java 17?

Question 3easymultiple choice
Read the full NAT/PAT explanation →

You 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?

Question 4mediumdrag order
Read the full Utilizing Java Object-Oriented Approach explanation →

Arrange the steps to override equals() and hashCode() correctly in Java.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5
Question 5mediummatching
Read the full NAT/PAT explanation →

Match each functional interface to its abstract method signature.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

T get()

void accept(T t)

R apply(T t)

boolean test(T t)

T apply(T t)

Question 6mediummultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

A developer writes a class `Employee` with a private field `salary`. Which approach correctly allows subclasses to access `salary` directly without breaking encapsulation?

Question 7easymultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Given 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?

Question 8hardmultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

A class `Transaction` is declared as `sealed`. Which statement correctly implements a permitted subclass?

Question 9mediummultiple choice
Read the full NAT/PAT explanation →

Which design pattern is best suited for creating a family of related objects without specifying their concrete classes?

Question 10easymultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

A class `Account` has a method `public void deposit(double amount)`. Which approach correctly demonstrates method overloading?

Question 11hardmultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Given a record `Point(int x, int y)`, which statement is true about the automatically generated constructor?

Question 12mediummultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

A developer needs to ensure that a class `Shape` cannot be instantiated but can be extended. Which modifier should be used?

Question 13hardmulti select
Read the full Utilizing Java Object-Oriented Approach explanation →

Which TWO statements about Java interfaces are true? (Choose two.)

Question 14easymulti select
Read the full Utilizing Java Object-Oriented Approach explanation →

Which TWO access modifiers can be applied to a top-level class in Java? (Choose two.)

Question 15mediummulti select
Read the full Utilizing Java Object-Oriented Approach explanation →

Which THREE conditions must be true for a method to override another method in a subclass? (Choose three.)

Question 16hardmultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Given the exhibit, what is a key difference between a materialized view and a regular view?

Exhibit

Refer to the exhibit.

```
-- SQL to create table
CREATE TABLE departments (
    dept_id INT PRIMARY KEY,
    dept_name VARCHAR(50)
);

-- Materialized view with refresh
CREATE MATERIALIZED VIEW dept_summary
REFRESH COMPLETE ON DEMAND
AS
SELECT dept_id, COUNT(*) AS emp_count
FROM employees
GROUP BY dept_id;

-- Query
SELECT * FROM dept_summary;
```
Question 17mediummultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Given the exhibit, which statement about calling this function in a SELECT statement is true?

Exhibit

Refer to the exhibit.

```
-- Creating a PL/SQL function
CREATE OR REPLACE FUNCTION get_emp_name (p_emp_id NUMBER) RETURN VARCHAR2 IS
    v_name employees.last_name%TYPE;
BEGIN
    SELECT last_name INTO v_name FROM employees WHERE employee_id = p_emp_id;
    RETURN v_name;
END;
```
Question 18hardmultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

A 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?

Question 19mediummulti select
Read the full Utilizing Java Object-Oriented Approach explanation →

Which two statements are true about records in Java? (Choose two.)

Question 20hardmultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Which statement about the code is correct?

Exhibit

Refer to the exhibit.

sealed class Shape permits Circle, Square {
    abstract double area();
}

final class Circle extends Shape {
    double area() { return 0; }
}

non-sealed class Square extends Shape {
    double area() { return 0; }
}

class Triangle extends Shape { }
Question 21easymultiple choice
Read the full NAT/PAT explanation →

You 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?

Question 22hardmultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Refer to the exhibit. What is the output?

Exhibit

public class Outer {
    private int x = 10;
    class Inner {
        private int x = 20;
        void method() {
            int x = 30;
            System.out.println(x);
            System.out.println(this.x);
            System.out.println(Outer.this.x);
        }
    }
    public static void main(String[] args) {
        Outer.Inner inner = new Outer().new Inner();
        inner.method();
    }
}
Question 23hardmultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Refer to the exhibit. What is the result?

Exhibit

abstract class Animal {
    abstract void sound();
}
interface Pet {
    default void play() { System.out.println("Playing"); }
}
class Dog extends Animal implements Pet {
    void sound() { System.out.println("Bark"); }
}
public class Test {
    public static void main(String[] args) {
        Dog d = new Dog();
        d.sound();
        d.play();
    }
}
Question 24hardmultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Refer to the exhibit. Which statement about this Singleton implementation is correct?

Exhibit

public class Singleton {
    private static volatile Singleton instance;
    private Singleton() {}
    public static Singleton getInstance() {
        if (instance == null) {
            synchronized (Singleton.class) {
                if (instance == null) {
                    instance = new Singleton();
                }
            }
        }
        return instance;
    }
}
Question 25mediummultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Refer to the exhibit. What is the result?

Exhibit

sealed class Shape permits Circle, Rectangle {
    void draw() { System.out.println("Shape"); }
}
non-sealed class Circle extends Shape {
    void draw() { System.out.println("Circle"); }
}
final class Rectangle extends Shape {
    void draw() { System.out.println("Rectangle"); }
}
class Triangle extends Shape {  // Line 10
    void draw() { System.out.println("Triangle"); }
}
Question 26hardmultiple choice
Read the full Utilizing Java Object-Oriented Approach explanation →

Refer to the exhibit. What is the output?

Exhibit

public record Point(int x, int y) {
    public Point {
        if (x < 0 || y < 0) {
            throw new IllegalArgumentException();
        }
    }
    public int x() { return x; }
    public int y() { return y; }
}
public class Test {
    public static void main(String[] args) {
        Point p1 = new Point(1, 2);
        Point p2 = new Point(1, 2);
        System.out.println(p1.equals(p2));
        System.out.println(p1.x() == p2.x());
    }
}

Practice tests

Scored 10-question sessions with instant feedback and explanations.

1Z0-829 Practice Test 1 — 10 Questions→1Z0-829 Practice Test 2 — 10 Questions→1Z0-829 Practice Test 3 — 10 Questions→1Z0-829 Practice Test 4 — 10 Questions→1Z0-829 Practice Test 5 — 10 Questions→1Z0-829 Practice Exam 1 — 20 Questions→1Z0-829 Practice Exam 2 — 20 Questions→1Z0-829 Practice Exam 3 — 20 Questions→1Z0-829 Practice Exam 4 — 20 Questions→Free 1Z0-829 Practice Test 1 — 30 Questions→Free 1Z0-829 Practice Test 2 — 30 Questions→Free 1Z0-829 Practice Test 3 — 30 Questions→1Z0-829 Practice Questions 1 — 50 Questions→1Z0-829 Practice Questions 2 — 50 Questions→1Z0-829 Exam Simulation 1 — 100 Questions→

Practice by domain

Each domain maps to a weighted exam section. Focus on the domain where you are weakest.

Handling Date, Time, Text, Numeric and Boolean ValuesControlling Program FlowUtilizing Java Object-Oriented ApproachHandling ExceptionsWorking with Arrays and CollectionsWorking with Streams and Lambda ExpressionsJava Platform Overview and PackagingJava I/O API and Securing Applications

Practice by scenario

Filter questions by type — troubleshooting, exhibit, drag-and-drop, PBQ, ACLs, OSPF, and more.

Browse scenarios→

Continue studying

All Utilizing Java Object-Oriented Approach setsAll Utilizing Java Object-Oriented Approach questions1Z0-829 Practice Hub