EXPERTY DESIGNED 1Z0-829 PRACTICE TEST

Oracle 1Z0-829 Exam Questions
Total Questions: 660
Java SE 17 Developer
Updated On: Jan 05, 2026
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: UK8291577
Given code of Test.java file:
package com.examtest.ocp; 
 
public class Test {
    public static void main(String[] args) {
        for:
        for (int i = 2; i <= 100; i = i + 2) {
            for(int j = 1; j <= 10; j++) {
                System.out.print(i * j + "\t");
            }
            System.out.println();
            if(i == 10) {
                break for;
            }
        }
    }
}
What is the result?

Options :
Answer: A

Question 3

Question ID: UK8295901
Consider below code:
package com.examtest.ocp;
 
public class Test {
    static Double d1;
    static int x = d1.intValue();
    
    public static void main(String[] args) {
        System.out.println("HELLO");
    }
}
On execution, does Test class print HELLO on to the console?

Options :
Answer: B

Question 4

Question ID: UK8291985
Consider below code of Test.java file:
package com.examtest.ocp;
 
import java.time.LocalDate;
 
public class Test {
    public static void main(String [] args) {
        LocalDate date = LocalDate.parse("1980-03-16");
        System.out.println(date.minusYears(-5));
    }
}
What is the result?

Options :
Answer: B

Question 5

Question ID: UK8298570
Consider below code of Test.java file:
package com.examtest.ocp; 
 
public class Test extends String {
    @Override
    public String toString() {
        return "TEST";
    }
    
    public static void main(String[] args) {
        Test obj = new Test();
        System.out.println(obj);
    }
}
What is the result?

Options :
Answer: D

© Copyrights Oracledumps 2026. 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.