Free Online Oracle 1Z0-829 Practice Test

Prepare Your Oracle 1Z0-829 Exam Questions with Free online 1Z0-829 Practice Test. Get Brilliant Java SE 17 Developer Exam Results with Valid 1Z0-829 Exam Dumps.

Page:    1 / 132      
Total 660 Questions | Updated On: Apr 25, 2024
Question 1

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?


Answer: B
Question 2

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?


Answer: A
Question 3

Question ID: UK8291167
Given code:
package com.examtest.ocp;
 
interface Message {
    String msg = "CONSISTENCY";
    public default void quoteOfTheDay() {
        record Quote(){ //Line n1
            String combine(String str) {
                return msg + "=" + str; //Line n2
            }
        }
        System.out.println(new Quote().combine("SUCCESS")); //Line n3
    }
}
 
public class Test {
    public static void main(String[] args) {
        new Message(){}.quoteOfTheDay(); //Line n4
    }
}
What is the result?


Answer: A
Question 4

Given the course table:



Given the code fragment:


 


Answer: C
Question 5

Question ID: UK8298565
Consider below code of Test.java file:
package com.examtest.ocp; 
 
public class Test {
    public static void main(String[] args) {
        String str = "*";
        /*INSERT*/
        System.out.println(str);
    }
}
Which of the following options, if used to replace /*INSERT*/, will compile successfully and on execution will print ***** on to the console?
Choose 2 options.


Answer: A,B
Page:    1 / 132      
Total 660 Questions | Updated On: Apr 25, 2024

© Copyrights DumpsCertify 2024. All Rights Reserved

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