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: Feb 19, 2025
Add To Cart
Question 1

Given the code fragment:

1Z0-808
What is the result?


Answer: D
Question 2

Consider below codes of 2 java files:

1. //Flyable.java

2. package com.sampleproject.oca;

3.  

4. public interface Flyable {

5.     static int horizontalDegree() { //Line n1

6.         return 20;

7.     }

8.  

9.     default void fly() {

10.         System.out.println("Flying at " + horizontalDegree() + " degrees."); //Line n2

11.     }

12.  

13.     void land();

14. }

1. //Aeroplane.java

2. package com.sampleproject.oca;

3.  

4. public class Aeroplane implements Flyable {

5.     public void land() {

6.         System.out.println("Landing at " + -Flyable.horizontalDegree() + " degrees."); //Line n3

7.     }

8.  

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

10.         new Aeroplane().fly();

11.         new Aeroplane().land();

12.     }

13. }

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


Answer: D
Question 3

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.         int i = 1;

6.         int j = 5;

7.         int k = 0;

8.         A: while(true) {

9.             i++;

10.             B: while(true) {

11.                 j--;

12.                 C: while(true) {

13.                     k += i + j;

14.                     if(i == j)

15.                         break A;

16.                     else if (i > j)

17.                         continue A;

18.                     else 

19.                         continue B;

20.                 }

21.             }

22.         }

23.         System.out.println(k);

24.     }

25. }

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


Answer: C
Question 4

Consider below code: 

1. //Test.java

2. package com.udayan.oca;

3.  

4. import java.time.LocalDate;

5.  

6. public class Test {

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

8.          LocalDate joiningDate = LocalDate.parse("2006-03-16");

9.          System.out.println(joiningDate.withDayOfYear(29));

10.      }

11. }

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


Answer: B
Question 5

Given:

1Z0-808
What is the result?


Answer: B
Page:    1 / 122      
Total 608 Questions | Updated On: Feb 19, 2025
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.