Top Tips Of 1Z0-809 ebook

It is impossible to pass Oracle 1Z0-809 exam without any help in the short term. Come to Examcollection soon and find the most advanced, correct and guaranteed Oracle 1Z0-809 practice questions. You will get a surprising result by our Updated Java SE 8 Programmer II practice guides.

2017 NEW RECOMMEND

Free VCE & PDF File for Oracle 1Z0-809 Real Exam
(Full Version!)

Pass on Your First TRY 100% Money Back Guarantee Realistic Practice Exam Questions

Free Instant Download NEW 1Z0-809 Exam Dumps (PDF & VCE):
Available on:
http://www.certleader.com/1Z0-809-dumps.html

Q21. Given the code fragment: 

List<Integer> codes = Arrays.asList (10, 20); 

UnaryOperator<Double> uo = s -> s +10.0; 

codes.replaceAll(uo); 

codes.forEach(c -> System.out.println(c)); 

What is the result? 

A. 20.0 

30.0 

B. 10 20 

C. A compilation error occurs. 

D. A NumberFormatException is thrown at run time. 

Answer:

Q22. Given: 

class Worker extends Thread { 

CyclicBarrier cb; 

public Worker(CyclicBarrier cb) { this.cb = cb; } 

public void run () { 

try { 

cb.await(); 

System.out.println(“Worker…”); 

} catch (Exception ex) { } 

class Master implements Runnable { //line n1 

public void run () { 

System.out.println(“Master…”); 

and the code fragment: 

Master master = new Master(); 

//line n2 

Worker worker = new Worker(cb); 

worker.start(); 

You have been asked to ensure that the run methods of both the Worker and Master classes are executed. 

Which modification meets the requirement? 

A. At line n2, insert CyclicBarrier cb = new CyclicBarrier(2, master); 

B. Replace line n1 with class Master extends Thread { 

C. At line n2, insert CyclicBarrier cb = new CyclicBarrier(1, master); 

D. At line n2, insert CyclicBarrier cb = new CyclicBarrier(master); 

Answer:

Q23. View the exhibit. 

Given the code fragment: 

Which change enables the code to print the following? 

James age: 20 

Williams age: 32 

A. Replacing line 5 with public static void main (String [] args) throws MissingInfoException, AgeOutofRangeException { 

B. Replacing line 5 with public static void main (String [] args) throws.Exception { 

C. Enclosing line 6 and line 7 within a try block and adding: catch(Exception e1) { //code goes here} catch (missingInfoException e2) { //code goes here} catch (AgeOutofRangeException e3) {//code goes here} 

D. Enclosing line 6 and line 7 within a try block and adding: catch (missingInfoException e2) { //code goes here} catch (AgeOutofRangeException e3) {//code goes here} 

Answer:

Q24. 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. 

Q25. Given: 

class UserException extends Exception { } 

class AgeOutOfLimitException extends UserException { } 

and the code fragment: 

class App { 

public void doRegister(String name, int age) 

throws UserException, AgeOutOfLimitException { 

if (name.length () < 6) { 

throw new UserException (); 

} else if (age >= 60) { 

throw new AgeOutOfLimitException (); 

} else { 

System.out.println(“User is registered.”); 

public static void main(String[ ] args) throws UserException { 

App t = new App (); 

t.doRegister(“Mathew”, 60); 

What is the result? 

A. User is registered. 

B. An AgeOutOfLimitException is thrown. 

C. A UserException is thrown. 

D. A compilation error occurs in the main method. 

Answer:

Q26. Given: What is the result? 

A. 0 Done 

B. First Exception Done 

C. Second Exception 

D. Done Third Exception 

E. Third Exception 

Answer:

Q27. Given the structure of the STUDENT table: 

Student (id INTEGER, name VARCHAR) 

Given: 

public class Test { 

static Connection newConnection =null; 

public static Connection get DBConnection () throws SQLException { 

try (Connection con = DriveManager.getConnection(URL, username, password)) { 

newConnection = con; 

return newConnection; 

public static void main (String [] args) throws SQLException { 

get DBConnection (); 

Statement st = newConnection.createStatement(); 

st.executeUpdate(“INSERT INTO student VALUES (102, ‘Kelvin’)”); 

Assume that: 

The required database driver is configured in the classpath. 

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

The SQL query is valid. 

What is the result? 

A. The program executes successfully and the STUDENT table is updated with one record. 

B. The program executes successfully and the STUDENT table is NOT updated with any record. 

C. A SQLException is thrown as runtime. 

D. A NullPointerException is thrown as runtime. 

Answer:

Q28. Given the code fragment: 

ZonedDateTime depart = ZonedDateTime.of(2015, 1, 15, 3, 0, 0, 0, ZoneID.of(“UTC-7”)); ZonedDateTime arrive = ZonedDateTime.of(2015, 1, 15, 9, 0, 0, 0, ZoneID.of(“UTC-5”)); long hrs = ChronoUnit.HOURS.between(depart, arrive); //line n1 System.out.println(“Travel time is” + hrs + “hours”); 

What is the result? 

A. Travel time is 4 hours 

B. Travel time is 6 hours 

C. Travel time is 8 hours 

D. An exception is thrown at line n1. 

Answer:

Q29. Which two statements are true for a two-dimensional array? 

A. It is implemented as an array of the specified element type. 

B. Using a row by column convention, each row of a two-dimensional array must be of the same size. 

C. At declaration time, the number of elements of the array in each dimension must be specified. 

D. All methods of the class Object may be invoked on the two-dimensional array. 

Answer: A,D 

Q30. 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:

Certleader Dumps
Certleader is a company specialized on providing high quality IT exam materials and fully committed to assist our respected clients crack any IT certification tests on their 1st efforts.