we provide Free Oracle 1Z0-809 download which are the best for clearing 1Z0-809 test, and to get certified by Oracle Java SE 8 Programmer II. The 1Z0-809 Questions & Answers covers all the knowledge points of the real 1Z0-809 exam. Crack your Oracle 1Z0-809 Exam with latest dumps, guaranteed!

Q1. Given: 

Book.java: 

public class Book { 

private String read(String bname) { return “Read” + bname } 

EBook.java: 

public class EBook extends Book { 

public class String read (String url) { return “View” + url } 

Test.java: 

public class Test { 

public static void main (String[] args) { 

Book b1 = new Book(); 

b1.read(“Java Programing”); 

Book b2 = new EBook(); 

b2.read(“http://ebook.com/ebook”); 

What is the result? 

A. Read Java Programming View http:/ ebook.com/ebook 

B. Read Java Programming Read http:/ ebook.com/ebook 

C. The EBook.java file fails to compile. 

D. The Test.java file fails to compile. 

Answer:


Q2. You have been asked to create a ResourceBundle which uses a properties file to localize an application. 

Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Menu? 

A. <key name = ‘menu1”>File Menu</key> <key name = ‘menu2”>View Menu</key> 

B. <key>menu1</key><value>File Menu</value> <key>menu2</key><value>View Menu</value> 

C. menu1, File Menu, menu2, View Menu 

D. menu1 = File Menu menu2 = View Menu 

Answer:


Q3. Which statement is true about java.util.stream.Stream? 

A. A stream cannot be consumed more than once. 

B. The execution mode of streams can be changed during processing. 

C. Streams are intended to modify the source data. 

D. A parallel stream is always faster than an equivalent sequential stream. 

Answer:


Q4. Given: 

class Sum extends RecursiveAction { //line n1 

static final int THRESHOLD_SIZE = 3; 

int stIndex, lstIndex; 

int [ ] data; 

public Sum (int [ ]data, int start, int end) { 

this.data = data; 

this stIndex = start; 

this. lstIndex = end; 

protected void compute ( ) { 

int sum = 0; 

if (lstIndex – stIndex <= THRESHOLD_SIZE) { 

for (int i = stIndex; i < lstIndex; i++) { 

sum += data [i]; 

System.out.println(sum); 

} else { 

new Sum (data, stIndex + THRESHOLD_SIZE, lstIndex).fork( ); 

new Sum (data, stIndex, 

Math.min (lstIndex, stIndex + THRESHOLD_SIZE) 

).compute (); 

and the code fragment: 

ForkJoinPool fjPool = new ForkJoinPool ( ); int data [ ] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} fjPool.invoke (new Sum (data, 0, data.length)); 

and given that the sum of all integers from 1 to 10 is 55. Which statement is true? 

A. The program prints several values that total 55. 

B. The program prints 55. 

C. A compilation error occurs at line n1. 

D. The program prints several values whose sum exceeds 55. 

Answer:


Q5. Given the code fragment: 

What is the result? 

A. Found Red Found Default 

B. Found Teal 

C. Found Red Found Blue Found Teal 

D. Found Red Found Blue Found Teal Found Default 

E. Found Default 

Answer:


Q6. Given the code fragment: 

UnaryOperator<Integer> uo1 = s -> s*2;line n1 

List<Double> loanValues = Arrays.asList(1000.0, 2000.0); 

loanValues.stream() 

.filter(lv -> lv >= 1500) 

.map(lv -> uo1.apply(lv)) 

.forEach(s -> System.out.print(s + “ “)); 

What is the result? 

A. 4000.0 

B. 4000 

C. A compilation error occurs at line n1. 

D. A compilation error occurs at line n2. 

Answer:


Q7. Given the code fragment: 

List<String> empDetails = Arrays.asList(“100, Robin, HR”, 

“200, Mary, AdminServices”, 

“101, Peter, HR”); 

empDetails.stream() 

.filter(s-> s.contains(“1”)) 

.sorted() 

.forEach(System.out::println); //line n1 

What is the result? 

A. 100, Robin, HR 101, Peter, HR 

B. E. A compilation error occurs at line n1. 

C. 100, Robin, HR 101, Peter, HR 200, Mary, AdminServices 

D. 100, Robin, HR 200, Mary, AdminServices 101, Peter, HR 

Answer:


Q8. Given: A. ns = 50 S = 125 ns = 125 S = 125 ns = 100 S = 125 

B. ns = 50 S = 125 ns = 125 S = 125 ns = 0 S = 125 

C. ns = 50 S = 50 ns = 125 S = 125 ns = 100 S = 100 

D. ns = 50 S = 50 ns = 125 S = 125 ns = 0 S = 125 

Answer:


Q9. Given the code fragment: 

public class Foo { 

public static void main (String [ ] args) { 

Map<Integer, String> unsortMap = new HashMap< > ( ); 

unsortMap.put (10, “z”); 

unsortMap.put (5, “b”); 

unsortMap.put (1, “d”); 

unsortMap.put (7, “e”); 

unsortMap.put (50, “j”); 

Map<Integer, String> treeMap = new TreeMap <Integer, String> (new 

Comparator<Integer> ( ) { 

@Override public int compare (Integer o1, Integer o2) {return o2.compareTo 

(o1); } } ); 

treeMap.putAll (unsortMap); 

for (Map.Entry<Integer, String> entry : treeMap.entrySet () ) { 

System.out.print (entry.getValue () + “ “); 

What is the result? 

A. A compilation error occurs. 

B. d b e z j 

C. j z e b d 

D. z b d e j 

Answer:


Q10. Given: 

class Bird { 

public void fly () { System.out.print(“Can fly”); } 

class Penguin extends Bird { 

public void fly () { System.out.print(“Cannot fly”); } 

and the code fragment: 

class Birdie { 

public static void main (String [ ] args) { 

fly( ( ) -> new Bird ( )); 

fly (Penguin : : new); 

/* line n1 */ 

Which code fragment, when inserted at line n1, enables the Birdie class to compile? 

A. static void fly (Consumer<Bird> bird) { 

bird :: fly (); } 

B. static void fly (Consumer<? extends Bird> bird) { 

bird.accept( ) fly (); 

C. static void fly (Supplier<Bird> bird) { 

bird.get( ) fly (); 

D. static void fly (Supplier<? extends Bird> bird) { 

LOST 

Answer:

Explanation: NOTE: Very confusing question. There is no logic in the options.