Higher Test Marks with Free Online 1Z0-829 Exam Practice

Assess the CertsIQ’s updated 1Z0-829 exam questions for free online practice of your Java SE 17 Developer test. Our Oracle Certified Professional: Java SE 17 Developer 1Z0-829 dumps questions will enhance your chances of passing the Oracle Java certification exam with higher marks.

Exam Code: 1Z0-829
Exam Questions: 660
Java SE 17 Developer
Updated: 19 Aug, 2025
Question 1

Given the directory structure:




Given the definition of the Doc class:




Which two are valid definition of the wordDoc class?


Options :
Answer: A,E

Question 2

Question ID: UK8296394
Consider below code of Test.java file:
package com.examtest.ocp;
 
public class Test {
    public static void main(String[] args) {
        var sb = new StringBuilder();
        System.out.println(sb.append("").append("").append("").length());
    }
}
What is the result?

Options :
Answer: A

Question 3

Question ID: UK8291153
Given code of Test.java file:
package com.examtest.ocp;
 
import java.util.ArrayList;
import java.util.List;
 
class Person {
    private String name;
    private int age;
    
    Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    
    public String toString() {
        return "Person[" + name + ", " + age + "]";
    }
    
    public boolean equals(Person obj) {
        if(obj instanceof Person) {
            Person person = (Person)obj;
            if(this.name.equals(person.name) && this.age == person.age) {
                return true;
            }
        }
        return false;
    }
}
 
public class Test {
    public static void main(String[] args) {
        List<Person> persons = new ArrayList<>();
        persons.add(new Person("Liam", 25));
        persons.add(new Person("Liam", 27));
        persons.add(new Person("Liam", 25));
        persons.add(new Person("Liam", 25));
        
        persons.remove(new Person("Liam", 25));
        
        for(Person person : persons) {
            System.out.println(person);
        }
    }
}
What is the result?

Options :
Answer: D

Question 4

Skipped
Question ID: UK8295920
Given code of Test.java file:
package com.examtest.ocp;
 
public class Test {
    public static void main(String[] args) {
        int x = 4;
        switch (x) {
            default -> System.out.println("Unknown");
            case 1 -> System.out.println("x is equal to 1");
            case 2 -> System.out.println("x is equal to 2");
            case 3 -> System.out.println("x is equal to 3");
        }
    }
}
What is the result?

Options :
Answer: B

Question 5

Question ID: UK8298581
Given the code fragment:
String txt = "an";
System.out.println(txt.split("an").length);
What is the result?

Options :
Answer: A

Viewing Page : 1 - 66
Practicing : 1 - 5 of 660 Questions

© Copyrights CertsIQ 2025. All Rights Reserved

We use cookies to ensure that we give you the best experience on our website (CertsIQ). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the CertsIQ.