EXPERTY DESIGNED 1Z0-809 PRACTICE TEST

Oracle 1Z0-809 Exam Questions
Total Questions: 469
Java SE 8 Programmer II
Updated On: Nov 24, 2025
Page : 1-47
Question 1

Given the code fragments:

Untitled1-page69-image83
and
Untitled1-page69-image88
What is the result?

Options :
Answer: D

Question 2

Given code of Test.java file: 

1. package com.udayan.ocp;

2.  

3. import java.util.stream.Stream;

4.  

5. public class Test {

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

7.         Stream stream = Stream.of("d", "cc", "bbb", "aaaa");

8.         stream.sorted().forEach(System.out::println);

9.     }

10. }

Which of the following needs to be done, so that output is: 

d

cc

bbb

aaaa

Options :
Answer: B

Question 3

Assume that proper import statements are available, and 'fr' is the language code for French language. 

And you have the following code snippet:

Locale [] loc = Locale.getAvailableLocales(); 

Which of the following statements will print all the supported (by the JVM) French Language Locale on to the console?

Select 2 options.

Options :
Answer: C,D

Question 4

Given code of Test.java file:

package com.udayan.ocp;

 

import java.util.Arrays;

import java.util.List;

 

public class Test {

    public static void main(String[] args) {

        List list = Arrays.asList("A", "E", "I", "O");

        list.add("U");

        list.forEach(System.out::print);

    }

}

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

Options :
Answer: B

Question 5

Given code of Test.java file: 

1. package com.udayan.ocp;

2.  

3. import java.util.Arrays;

4. import java.util.List;

5. import java.util.ListIterator;

6.  

7. public class Test {

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

9.         List list = Arrays.asList("T", "S", "R", "I", "F");

10.         ListIterator iter = list.listIterator(2);

11.         while(iter.hasNext()) {

12.             System.out.print(iter.next());

13.         }

14.     }

15. }

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

Options :
Answer: B

© Copyrights Oracledumps 2025. All Rights Reserved

We use cookies to ensure that we give you the best experience on our website (Oracledumps). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the Oracledumps.