×

Special Offer! Sale of the Month | Extra 20% OFF - Ends In Coupon code: TEL20

Why Oracle 1Z0-829 Practice Exam Questions?

Ready to level up your Oracle 1Z0-829 exam study? Just TheExamsLab 1Z0-829 practice tests free.

1Z0-829 exam questions are expertly crafted practice tests designed to simulate the real Oracle certification exam environment and help you assess your knowledge and figure out where you are lacking. From our free Java SE 17 Developer 1Z0-829 practice exam, you will feel secure in passing any question type or time limit. TheExamsLab offers the 1Z0-829 exam questions 2024. Don’t settle or do it half-heartedly get the best and invest in the best what you want is what you get.

Page:    1 / 132      
Total 660 Questions | Updated On: Nov 19, 2024
Add To Cart
Question 1

Question ID: UK8295941
Given code of TestStudent.java file:
package com.examtest.ocp;
 
class Student {
    String name;
    int age;
    boolean result;
    double height;
}
 
public class TestStudent {
    public static void main(String[] args) {
        var stud = new Student(); //Line n1
        System.out.println(stud.name + stud.height + stud.result + stud.age); //Line n2
    }
}
What is the result?


Answer: A
Question 2

Question ID: UK8297257
Given code of Test.java file:

package com.examtest.ocp;
 
public class Test {
    public static void main(String[] args) {
        int x = 2;
        switch (x) {
            default:
                System.out.println("Still no idea what x is");
            case 1:
                System.out.println("x is equal to 1");
                break;
            case 2:
                System.out.println("x is equal to 2");
                break;
            case 3: 
                System.out.println("x is equal to 3");
                break;
        }
    }
}
What is the result?


Answer: A
Question 3

Question ID: UK8291961
Consider below statements:
1. int x = 5____0;
2. int y = ____50;
3. int z = 50____;
4. float f = 123.76_86f;
5. double d = 1_2_3_4;
How many statements are legal?


Answer: C
Question 4

Question ID: UK8291953
Consider below code of Test.java file:
package com.examtest.ocp;
 
public class Test {
    public static void main(String [] args) {
        var text = """
            I gave him $200 and \
            he returned me €120, \
            so I am left with £80.""";
 
        System.out.println(
            text.transform(Test::removeCurrencySymbols)
                .transform(String::toUpperCase)
                .formatted("¥", "¥", "¥"));
    }
 
    private static String removeCurrencySymbols(String s) {
        return s.replaceAll("\\$", "%s")
                .replaceAll("€", "%s")
                .replaceAll("£", "%s");
    }
}
What is the result?


Answer: B
Question 5

Question ID: UK8295518
How many of the below code statements, written inside main method will compile successfully?
1. var arr1 = new int[]{10};
2. var arr2 = new String[][] {};
3. var arr3 = new char[][] {{}};
4. var arr4 = {10, 20, 30};
5. var arr5 = new String[][] {new String[]{"LOOK"}, new String[] {"UP"}};
6. var [] arr6 = new int[] {2, 3, 4};


Answer: A
Page:    1 / 132      
Total 660 Questions | Updated On: Nov 19, 2024
Add To Cart

© Copyrights TheExamsLab 2024. All Rights Reserved

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