Free Oracle 1Z0-808 Exam Questions

Become Oracle Certified with updated 1Z0-808 exam questions and correct answers

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

What is the signature of special main method?


Answer: D
Question 2

Given the code fragments:

1Z0-808
And: 
1Z0-808
Which statement is true?


Answer: C
Question 3

Given code of Test.java file:

1. package com.sampleproject.oca;

2.  

3. public class Test {

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

5.         try { //outer

6.             try { //inner

7.                 System.out.println(1/0);

8.             } catch(ArithmeticException e) {

9.                 System.out.println("INNER");

10.             } finally {

11.                 System.out.println("FINALLY 1");

12.             }

13.         } catch(ArithmeticException e) {

14.             System.out.println("OUTER");

15.         } finally {

16.             System.out.println("FINALLY 2");

17.         }

18.     }

19. }

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


Answer: D
Question 4

Consider below code of Test.java file:

1. package com.sampleproject.oca;

2.  

3. interface Perishable1 {

4.     default int maxDays() {

5.         return 1;

6.     }

7. }

8.  

9. interface Perishable2 extends Perishable1 {

10.     default int maxDays() {

11.         return 2;

12.     }

13. }

14.  

15. class Milk implements Perishable2, Perishable1 {}

16.  

17. public class Test {

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

19.         Perishable1 obj = new Milk();

20.         System.out.println(obj.maxDays());

21.     }

22. }

Which of the following statements is correct?


Answer: A
Question 5

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
Page:    1 / 122      
Total 608 Questions | Updated On: Aug 21, 2019
Add To Cart

© Copyrights DumpsCertify 2025. All Rights Reserved

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