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

Question ID: UK8291921Given code of Test.java file:package com.examtest.ocp; import java.time.*; public class Test {    public static void main(String [] args) {        System.out.println(Duration.ofDays(-2));    }}What is the result?

Options :
Answer: C

Question 2

Question ID: UK8293794Given code of Test.java file:package com.examtest.ocp; class MyException extends RuntimeException {} class YourException extends RuntimeException {} public class Test {    public static void main(String[] args) {        try {            throw new YourException();        } catch(MyException | YourException e){            e = null;        }    }}What is the result?

Options :
Answer: A

Question 3

Question ID: UK8298141Consider below 3 statements:1. System.out.println(700 * Math.pow(2, -2));2. System.out.println(700 * (1 / 4));3. System.out.println(7 * Math.ceil(24.80));Do all the three statements produce same output?

Options :
Answer: B

Question 4

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 5

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

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.