Want to know Examcollection 1Z0-809 Exam practice test features? Want to lear more about Oracle Java SE 8 Programmer II certification experience? Study Free Oracle 1Z0-809 answers to Regenerate 1Z0-809 questions at Examcollection. Gat a success with an absolute guarantee to pass Oracle 1Z0-809 (Java SE 8 Programmer II) test on your first attempt.

2021 Nov 1Z0-809 free exam questions

Q81. Given: 

IntStream stream = IntStream.of (1,2,3); IntFunction<Integer> inFu= x -> y -> x*y;//line n1 IntStream newStream = stream.map(inFu.apply(10));//line n2 


Which modification enables the code fragment to compile? 

A. Replace line n1 with: 

IntFunction<UnaryOperator> inFu = x -> y -> x*y; 

B. Replace line n1 with: 

IntFunction<IntUnaryOperator> inFu = x -> y -> x*y; 

C. Replace line n1 with: 

BiFunction<IntUnaryOperator> inFu = x -> y -> x*y; 

D. Replace line n2 with: 

IntStream newStream = stream.map(inFu.applyAsInt (10)); 


Q82. Given: 

interface Rideable {Car getCar (String name); } 

class Car { 

private String name; 

public Car (String name) { 

this.name = name; 

Which code fragment creates an instance of Car? 

A. Car auto = Car (“MyCar”): : new; 

B. Car auto = Car : : new; 

Car vehicle = auto : : getCar(“MyCar”); 

C. Rideable rider = Car : : new; 

Car vehicle = rider.getCar(“MyCar”); 

D. Car vehicle = Rideable : : new : : getCar(“MyCar”); 


Q83. Given: What is the result? 

A. 100 210 

B. Compilation fails due to an error in line n1 

C. Compilation fails due to an error at line n2 

D. Compilation fails due to an error at line n3 


Q84. public class ForTest { 

public static void main(String[] args) { 

int[] arrar = {1,2,3}; 

for ( foo ) { 

Which three are valid replacements for foo so that the program will compiled and run? 

A. int i: array 

B. int i = 0; i < 1; i++ 

C. ;; 

D. ; i < 1; i++ 

E. ; i < 1; 

Answer: A,B,C 

Avant-garde 1Z0-809 latest exam:

Q85. Which two statements are true about localizing an application? 

A. Support for new regional languages does not require recompilation of the code. 

B. Textual elements (messages and GUI labels) are hard-coded in the code. 

C. Language and region-specific programs are created using localized data. 

D. Resource bundle files include data and currency information. 

E. Language codes use lowercase letters and region codes use uppercase letters. 

Answer: A,E 

Reference: http://docs.oracle.com/javase/7/docs/technotes/guides/intl/ 

Q86. Given the code fragment: 


Connection conn = DriveManager.getConnection(dbURL, userName, passWord); 


String query = “SELECT id FROM Employee”; 


try (Statement stmt = conn.createStatement()) { 


ResultSet rs = stmt.executeQuery(query); 13.stmt.executeQuery(“SELECT id FROM Customer”); 


while (rs.next()) { 


//process the results 16.System.out.println(“Employee ID: “+ rs.getInt(“id”)); 17.} 


} catch (Exception e) { 


System.out.println (“Error”); 


Assume that: 

The required database driver is configured in the classpath. 

The appropriate database is accessible with the dbURL, userName, and passWord exists. 

The Employee and Customer tables are available and each table has id column with a few 

records and the SQL queries are valid. 

What is the result of compiling and executing this code fragment? 

A. The program prints employee IDs. 

B. The program prints customer IDs. 

C. The program prints Error. 

D. compilation fails on line 13. 


Q87. Given the fragments: 

Which line causes a compilation error? 

A. Line n1 

B. Line n2 

C. Line n3 

D. Line n4 


Q88. Given the code fragment: 

int b = 3; 

if ( !(b > 3)) { 

System.out.println("square "); 


System.out.println("circle "); 


What is the result? 

A. square... 

B. circle... 

C. squarecircle... 

D. Compilation fails. 


Q89. Given the code fragment: 

Path path1 = Paths.get(“/app/./sys/”); 

Path res1 = path1.resolve(“log”); 

Path path2 = Paths.get(“/server/exe/”); 

Path res1 = path1.resolve(“/readme/”); 



What is the result? 

A. /app/sys/log /readme/server/exe 

B. /app/log/sys /server/exe/readme 

C. /app/./sys/log /readme 

D. /app/./sys/log /server/exe/readme