EXPERTY DESIGNED 1Z0-829 PRACTICE TEST

Oracle 1Z0-829 Exam Questions
Total Questions: 660
Java SE 17 Developer
Updated On: Nov 11, 2025
Page : 1-66
Question 1

Question ID: UK8297797
Given code:
package com.examtest.ocp;
 
import java.util.ArrayList;
import java.util.List;
 
public class Test {
    public static void main(String[] args) {
       var list = new ArrayList<String>(); //Line n1
       list.add("A");
       list.add("M");
       var list_of_list = List.of(list); //Line n2
       list_of_list.get(0).set(1, "N"); //Line n3
       list_of_list.get(0).forEach(System.out::print); //Line n4
    }
}
What is the result?

Options :
Answer: D

Question 2

Question ID: UK8294673
Consider below code of Test.java file:
package com.examtest.ocp;
 
abstract class Log {
    abstract long count(); //Line n1
    abstract Object get(); //Line n2
}
 
class CommunicationLog extends Log {
    int count() { //Line n3
        return 100;
    }
    
    String get() { //Line n4
        return "COM-LOG";
    }
}
 
public class Test {
    public static void main(String[] args) {
        Log log = new CommunicationLog(); //Line n5
        System.out.print(log.count());
        System.out.print(log.get());
    }
}
Which of the following statement is correct?

Options :
Answer: A

Question 3

Question ID: UK8295509
Given code of Test.java file:
package com.examtest.ocp;
 
public class Test {
    public static void main(String[] args) {
        String arr1 [], arr2, arr3 = null; //Line n1
        arr1 = new String[2];
        arr1[0] = "A";
        arr1[1] = "B";
        arr2 = arr3 = arr1; //Line n2
        System.out.println(String.join("-", arr2)); //Line n3
    }
}
What is the result?

Options :
Answer: B

Question 4

Question ID: UK8295123
Given code of Test.java file:
package com.examtest.ocp;
 
import java.util.ArrayList;
import java.util.List;
 
public class Test {
    public static void main(String[] args) {
        List<Character> list = new ArrayList<>();
        list.add(0, 'E');
        list.add('X');
        list.add(1, 'P');
        list.add(3, 'O');
        
        if(list.contains('O')) {
            list.remove('O');
        }
        
        for(char ch : list) {
            System.out.print(ch);
        }
    }
}
What is the result?

Options :
Answer: B

Question 5

Given:




What is the result?

Options :
Answer: E

© Copyrights Oracledumps 2025. All Rights Reserved

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