Free Oracle 1Z0-808 Exam Questions

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

  • Oracle 1Z0-808 Exam Questions
  • Provided By: Oracle
  • Exam: Java SE 8 Programmer I
  • Certification: Oracle Certified Associate
  • Total Questions: 608
  • Updated On: Apr 29, 2025
  • Rated: 4.9 |
  • Online Users: 1216
Page No. 1 of 122
Add To Cart
  • Question 1
    • Consider below code of Test.java file:

      1. package com.sampleproject.oca; 

      2.  

      3. public class Test {

      4.     public static void main(String[] args) {

      5.         /*INSERT*/ x = 7, y = 200;

      6.         System.out.println(String.valueOf(x + y).length());

      7.     }

      8. }

      Which of the following options, if used to replace /*INSERT*/, will compile successfully and on execution will print 3 on to the console?

      Select 3 options.


      Answer: A,B,F
  • Question 2
    • Given code of Thought.java file:

      1. public class Thought {

      2.     /*INSERT*/ {

      3.         System.out.println("All is well");

      4.     }

      5. }

      Which 3 options, if used to replace /*INSERT*/, will compile successfully and on execution will print "All is well" on to the console?


      Answer: A,B,G
  • Question 3
    • Given code of Test.java file:

      1. package com.sampleproject.oca;

      2.  

      3. interface Blogger {

      4.     default void blog() throws Exception {

      5.         System.out.println("GENERIC");

      6.     }

      7. }

      8.  

      9. class TravelBlogger implements Blogger {

      10.     public void blog() {

      11.         System.out.println("TRAVEL");

      12.     }

      13. }

      14.  

      15. public class Test {

      16.     public static void main(String[] args) {

      17.         Blogger blogger = new TravelBlogger(); //Line n1

      18.         ((TravelBlogger)blogger).blog(); //Line n2

      19.     }

      20. }

      What will be the result of compiling and executing Test class?


      Answer: B
  • Question 4
    • Which statement is true about the switch statement?

      Answer: D
  • Question 5
    • What will be the result of compiling and executing Test class?

      package com.udayan.oca;

       

      public class Test {

          public static void main(String[] args) {

              m1(null);

          }

          

          static void m1(CharSequence s) {

              System.out.println("CharSequence");

          }

          

          static void m1(String s) {

              System.out.println("String");

          }

         

          static void m1(Object s) {

              System.out.println("Object");

          }

      }


      Answer: D
PAGE: 1 - 122
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.