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 06, 2026
Add To Cart
Question 1

Question ID: UK8294673
Consider below code of Test.java file:
package com.examtest.ocp;
 
abstract class Log {
    abstract long count(); //Line n1
    abstract Object get(); //Line n2
}
 
class CommunicationLog extends Log {
    int count() { //Line n3
        return 100;
    }
    
    String get() { //Line n4
        return "COM-LOG";
    }
}
 
public class Test {
    public static void main(String[] args) {
        Log log = new CommunicationLog(); //Line n5
        System.out.print(log.count());
        System.out.print(log.get());
    }
}
Which of the following statement is correct?


Answer: A
Question 2

Question ID: UK8291180
Given code of Test.java file:
package com.examtest.ocp;
 
sealed abstract class Animal permits Cat, Dog { } //Line n1
 
non-sealed class Cat extends Animal { } //Line n2
 
final class Dog extends Animal { } //Line n3
 
final class Tiger extends Animal { } //Line n4
 
public class Test {
    public static void main(String [] args) {
        System.out.println("PERMITS CLAUSE");
    }
}
What is the result?


Answer: A
Question 3

Question ID: UK8292454
Given code of Test.java file:
package com.examtest.ocp;
 
public class Test {
    private static void div(int i, int j) {
        try {
            System.out.println(i / j);
        } catch(ArithmeticException e) {
            throw (RuntimeException)e;
        }
    }
    
    public static void main(String[] args) {
        try {
            div(5, 0);
        } catch(ArithmeticException e) {
            System.out.println("AE");
        } catch(RuntimeException e) {
            System.out.println("RE");
        }
    }
}
What is the result?


Answer: C
Question 4

Question ID: UK8298194
Given code of Test.java file:
package com.examtest.ocp;
 
public class Test {
    public static void main(String[] args) {
        short [] args = new short[]{50, 50};
        args[0] = 5;
        args[1] = 10;
        System.out.println("[" + args[0] + ", " + args[1] + "]");
    }
}
What is the result?


Answer: A
Question 5

Question ID: UK8293789
Given code of Test.java file:
package com.examtest.ocp;
 
class Base {
    public void log() throws NullPointerException {
        System.out.println("Base: log()");
    }
}
 
class Derived extends Base {
    public void log() throws RuntimeException {
        System.out.println("Derived: log()");
    }
}
 
public class Test {
    public static void main(String[] args) {
        Base obj = new Derived();
        obj.log();
    }
}
What is the result?


Answer: B
Page:    1 / 132      
Total 660 Questions | Updated On: Jan 06, 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.