×

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

Free Practice Oracle 1Z0-808 Exam Questions 2025

Stay ahead with 100% Free Java SE 8 Programmer I 1Z0-808 Dumps Practice Questions

Page:    1 / 122      
Total 608 Questions | Updated On: Aug 21, 2019
Add To Cart
Question 1

Given:

1Z0-808
What is the result?


Answer: D
Question 2

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

1. //Test.java

2. package com.udayan.oca;

3.  

4. import java.io.FileNotFoundException;

5.  

6. public class Test {

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

8.          try {

9.              System.out.println(1);

10.          } catch (NullPointerException ex) {

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

12.          } catch (FileNotFoundException ex) {

13.              System.out.println("TWO");

14.          }

15.          System.out.println("THREE");

16.      }

17. }


Answer: D
Question 3

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
Question 4

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.         String [][] arr = { {"%", "$$"}, {"***", "@@@@", "#####"}};

6.         for(String [] str : arr) {

7.             for(String s : str) {

8.                 System.out.println(s);

9.                 if(s.length() == 4) //Line n1

10.                     break; //Line n2

11.             }

12.             break; //Line n3

13.         }

14.     }

15. }

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


Answer: E
Question 5

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

package com.udayan.oca;

public class Test {

     static String msg; //Line 2

     public static void main(String[] args) {

         String msg; //Line 4

         if(args.length > 0) {

             msg = args[0]; //Line 6

         }

         System.out.println(msg); //Line 8

     }

}


Answer: C
Page:    1 / 122      
Total 608 Questions | Updated On: Aug 21, 2019
Add To Cart

© Copyrights TheExamsLab 2025. All Rights Reserved

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