Exam Code: 1Z0-829
Exam Questions: 660
Java SE 17 Developer
Updated: 06 Jan, 2026
Viewing Page : 1 - 66
Practicing : 1 - 5 of 660 Questions
Question 1

Question ID: UK8295913Given code of Test.java file:package com.examtest.ocp; record Rectangle(double length, double width) {} record Square(double side) extends Rectangle {} public class Test {    public static void main(String[] args) {        Square sq = new Square(10.0);        System.out.println(sq);    }}What is the result?

Options :
Answer: A

Question 2

Question ID: UK8292005Given code of Test.java file:package com.examtest.ocp; public class Test {    private T t;     public T get() {        return t;    }     public void set(T t) {        this.t = t;    }     public static void main(String args[]) {        Test obj = new Test();        obj.set("OCP");        obj.set(85);        obj.set('%');         System.out.println(obj.get());    }}What is the result?

Options :
Answer: D

Question 3

Question ID: UK8291924Given code of Test.java file:package com.examtest.ocp; import java.time.*; public class Test {    public static void main(String [] args) {        Period period = Period.ofWeeks(100);        System.out.println(period);    }}What is the result?

Options :
Answer: C

Question 4

Question ID: UK8298152Consider below code:package com.examtest.ocp; import java.time.LocalDate; public class Test {    public static void main(String [] args) {        LocalDate d1 = LocalDate.parse("1999-09-09");        LocalDate d2 = LocalDate.parse("1999-09-09");        LocalDate d3 = LocalDate.of(1999, 9, 9);        LocalDate d4 = LocalDate.of(1999, 9, 9);        System.out.println((d1 == d2) + ":" + (d2 == d3) + ":" + (d3 == d4));    }}What is the result?

Options :
Answer: D

Question 5

Given the directory structure:Given the definition of the Doc class:Which two are valid definition of the wordDoc class?

Options :
Answer: A,E

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

© Copyrights FreePDFQuestions 2026. All Rights Reserved

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