×

Special Offer! November Sale at DumpsCity! Get 20% Off on All Certification Exam Questions. Use Code: DC20OFF

Free Oracle 1Z0-829 Exam Questions

Try our Free Demo Practice Tests for Comprehensive 1Z0-829 Exam Preparation

  • Oracle 1Z0-829 Exam Questions
  • Provided By: Oracle
  • Exam: Java SE 17 Developer
  • Certification: Oracle Java
  • Total Questions: 660
  • Updated On: Nov 13, 2024
  • Rated: 4.9 |
  • Online Users: 1320
Page No. 1 of 132
Add To Cart
  • Question 1
    • 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 2
    • Question ID: UK8295913
      Given code of Test.java file:
      package com.examtest.ocp;
       
      record Rectangle(double length, double width) {}
       
      record Square(double side) extends Rectangle {}
       
      public class Test {
          public static void main(String[] args) {
              Square sq = new Square(10.0);
              System.out.println(sq);
          }
      }
      What is the result?

      Answer: A
  • Question 3
    • Question ID: UK8291549
      Given code of Test.java file:
      package com.examtest.ocp;
       
      public class Test {
          private static void m(int i) {
              System.out.print(1);
          }
          
          private static void m(int i1, int i2) {
              System.out.print(2);
          }
          
          private static void m(char... args) {
              System.out.print(3);
          }
         
          public static void main(String... args) {
              m('A');
              m('A', 'B');
              m('A', 'B', 'C');
              m('A', 'B', 'C', 'D');
          }
      }
      What is the result?

      Answer: C
  • Question 4
    • Question ID: UK8297797
      Given code:
      package com.examtest.ocp;
       
      import java.util.ArrayList;
      import java.util.List;
       
      public class Test {
          public static void main(String[] args) {
             var list = new ArrayList<String>(); //Line n1
             list.add("A");
             list.add("M");
             var list_of_list = List.of(list); //Line n2
             list_of_list.get(0).set(1, "N"); //Line n3
             list_of_list.get(0).forEach(System.out::print); //Line n4
          }
      }
      What is the result?

      Answer: D
  • 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
Add To Cart

© Copyrights Dumpscity 2024. All Rights Reserved

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