EXPERTY DESIGNED 1Z0-829 PRACTICE TEST

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

Question ID: UK8292860
Given code of Test.java file:
package com.examtest.ocp;
 
class Car {
    void speed(Byteval) { //Line n1
        System.out.println("DARK"); //Line n2
    } //Line n3
 
    void speed(byte... vals) {
        System.out.println("LIGHT");
    }
}
 
public class Test {
    public static void main(String[] args) {
        byte b = 10; //Line n4
        new Car().speed(b); //Line n5
    }
}
Which of the following needs to be done so that LIGHT is printed on to the console?

Options :
Answer: B

Question 2

Question ID: UK8297279
Consider below code of Test.java file:
package com.examtest.ocp;
 
public class Test {
    public static void main(String [] args) {
        boolean flag1 = true;
        boolean flag2 = false;
        boolean flag3 = true;
        boolean flag4 = false;
        
        System.out.println(!flag1 == flag2 != flag3 == !flag4); //Line n1
        System.out.println(flag1 = flag2 != flag3 == !flag4); //Line n2
    }
}
What is the result?

Options :
Answer: A

Question 3

Question ID: UK8296802
Given code:
package com.examtest.ocp;
 
class A {
    A() {
        System.out.print(1);
    }
    class B {
        B() {
            System.out.print(2);
        }
    }
}
 
public class Test {
    public static void main(String [] args) {
        B obj = new A().new B();
    }
}
What is the result?

Options :
Answer: A

Question 4

Given:

Which two method invocation execute? 

Options :
Answer: D,E

Question 5

Question ID: UK8292478
Given code of Test.java file:
package com.examtest.ocp;
 
import java.util.Arrays;
 
public class Test {
    public static void main(String[] args) {
        int [] array1 = {};
        int [] array2 = {100, 200};
        System.out.print(Arrays.compare(array1, array2));
        System.out.print(Arrays.mismatch(array1, array2));
    }
}
What is the result?

Options :
Answer: A

© 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.