Free Oracle 1Z0-829 Exam Questions

Become Oracle Certified with updated 1Z0-829 exam questions and correct answers

Page:    1 / 132      
Total 660 Questions | Updated On: Jan 13, 2026
Add To Cart
Question 1

Question ID: UK8296388
Consider below code of Test.java file:
package com.examtest.ocp; 
 
public class Test {
    public static void main(String[] args) {
        final var str = "+";
        System.out.println(str.repeat(2) == "++");
    }
}
What is the result?


Answer: B
Question 2

Question ID: UK8296394
Consider below code of Test.java file:
package com.examtest.ocp;
 
public class Test {
    public static void main(String[] args) {
        var sb = new StringBuilder();
        System.out.println(sb.append("").append("").append("").length());
    }
}
What is the result?


Answer: A
Question 3

Question ID: UK8297789
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) {
        Boolean [] arr = new Boolean[2];
        List<Boolean> list = new ArrayList<>();
        list.add(arr[0]);
        list.add(arr[1]);
        
        if(list.remove(0)) {
            list.remove(1);
        }
        
        System.out.println(list);
    }
}
What is the result?


Answer: C
Question 4

Question ID: UK8297735
Given code of Test.java file:
package com.examtest.ocp;
 
public class Test {
    enum TrafficLight {
        private String message;
        GREEN("go"), AMBER("slow"), RED("stop");
        
        TrafficLight(String message) {
            this.message = message;
        }
        
        public String getMessage() {
            return message;
        }
    }
    
    public static void main(String[] args) {
        System.out.println(TrafficLight.AMBER.getMessage().toUpperCase());
    }
What is the result?


Answer: C
Question 5

Question ID: UK8292486
Given code of Test.java file
package com.examtest.ocp;
public class Test {
    public static < T > T get(T t) {
        return t;
    }
    public static void main(String[] args) {
        String str = get("HELLO");
        System.out.println(str);
    }
}
What is the result?


Answer: A
Page:    1 / 132      
Total 660 Questions | Updated On: Jan 13, 2026
Add To Cart

© Copyrights DumpsCertify 2026. All Rights Reserved

We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsCertify.