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: Apr 28, 2025
  • Rated: 4.9 |
  • Online Users: 1320
Page No. 1 of 132
Add To Cart
  • Question 1
    • 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 2
    • Question ID: UK8292809
      Consider below code of Test.java file:
      package com.examtest.ocp; 
       
      public class Test {
          public static void main(String[] args) {
              System.out.println(add(90, 7));
              System.out.println(add('a', 1)); //ASCII code for 'a' is 97 and 'b' is 98
          }
          
          public static var add(int v1, int v2) {
              return v1 + v2;
          }
      }
      What is the result?

      Answer: A
  • Question 3
    • Question ID: UK8291585
      Given code of Test.java file:
      package com.examtest.ocp;
       
      public class Test {
          public static void main(String[] args) {
              var i = 1;
              var j = 5;
              var k = 0;
              A: while(true) {
                  i++;
                  B: while(true) {
                      j--;
                      C: while(true) {
                          k += i + j;
                          if(i == j)
                              break A;
                          else if (i > j)
                              continue A;
                          else 
                              continue B;
                      }
                  }
              }
              System.out.println(k);
          }
      }
      What is the result?

      Answer: A
  • Question 4
    • 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
  • Question 5
    • Question ID: UK8294624
      Given code:
      package com.examtest.ocp;
       
      class Outer {
          private String msg = "A";
          public void print() {
              final String msg = "B";
              class Inner {
                  public void print() {
                      System.out.println(this.msg);
                  }
              }
              Inner obj = new Inner();
              obj.print();
          }
      }
       
      public class Test {
          public static void main(String[] args) {
              new Outer().print(); 
          }
      }
      What is the result?

      Answer: A
PAGE: 1 - 132
Add To Cart

© Copyrights Dumpscity 2025. All Rights Reserved

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