Oracle 1Z0-808 Exam Real Questions

Prepare and pass your Java SE 8 Programmer I with free 1Z0-808 exam questions.

Page:    1 / 122      
Total 608 Questions | Updated On: Oct 10, 2024
Add To Cart
Question 1

Consider the following class:

1. package com.udayan.oca;

2.  

3. public class Employee {

4.      public int passportNo; //line 2

5. }

Which of the following is the correct way to make the variable 'passportNo' read only for any other class?


Answer: C
Question 2

Range of short data type is from -32768 to 32767

Which of the following code segments, written inside main method will compile successfully?

Select 3 options.


Answer: B,D
Question 3

What is the signature of special main method?


Answer: D
Question 4

CGiven the code fragments:

HPE6-A70
Which code fragment, when inserted at line n1, enables the code to print Hank?


Answer: C
Question 5

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
Page:    1 / 122      
Total 608 Questions | Updated On: Oct 10, 2024
Add To Cart

© Copyrights DumpsCertify 2024. All Rights Reserved

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