♥♥ 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.exam.com/1Z0-809-dumps.html


It is more faster and easier to pass the Oracle 1Z0-809 exam by using Practical Oracle Java SE 8 Programmer II questuins and answers. Immediate access to the Improve 1Z0-809 Exam and find the same core area 1Z0-809 questions with professionally verified answers, then PASS your exam with a high score now.

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


Q2. For which three objects must a vendor provide implementations in its JDBC driver? 

A. Time B. Date 

C. Statement 

D. ResultSet 

E. Connection 

F. SQLException 

G. DriverManager 

Answer: C,D,E 

Explanation: Database vendors support JDBC through the JDBC driver interface or through the ODBC connection. Each driver must provide implementations of java.sql.Connection, java.sql.Statement, java.sql.PreparedStatement, java.sql.CallableStatement, and java.sql.Re sultSet. They must also implement the java.sql.Driver interface for use by the generic java.sql.DriverManager interface. 


Q3. Given the code fragment: 

List<Integer> nums = Arrays.asList (10, 20, 8): 

System.out.println ( 

//line n1 

); 

Which code fragment must be inserted at line n1 to enable the code to print the maximum number in the nums list? 

A. nums.stream().max(Comparator.comparing(a -> a)).get() 

B. nums.stream().max(Integer : : max).get() 

C. nums.stream().max() 

D. nums.stream().map(a -> a).max() 

Answer:


Q4. Given: 

public interface Moveable<Integer> { 

public default void walk (Integer distance) {System.out.println(“Walking”);) 

public void run(Integer distance); 

Which statement is true? 

A. Moveable can be used as below: 

Moveable<Integer> animal = n - > System.out.println(“Running” + n); 

animal.run(100); 

animal.walk(20); 

B. Moveable can be used as below: 

Moveable<Integer> animal = n - > n + 10; 

animal.run(100); 

animal.walk(20); 

C. Moveable can be used as below: 

Moveable animal = (Integer n) - > System.out.println(n); 

animal.run(100); 

Moveable.walk(20); 

D. Movable cannot be used in a lambda expression. 

Answer:


Q5. Given: 

Item table 

. ID, INTEGER: PK 

. DESCRIP, VARCHAR(100) 

. PRICE, REAL 

. QUANTITY< INTEGER 

And given the code fragment: 

9. try { 

10.Connection conn = DriveManager.getConnection(dbURL, username, password); 

11. 

String query = “Select * FROM Item WHERE ID = 110”; 

12. 

Statement stmt = conn.createStatement(); 

13. 

ResultSet rs = stmt.executeQuery(query); 

14.while(rs.next()) { 

15.System.out.println(“ID:“ + rs.getInt(“Id”)); 

16.System.out.println(“Description:“ + rs.getString(“Descrip”)); 

17.System.out.println(“Price:“ + rs.getDouble(“Price”)); 

18. System.out.println(Quantity:“ + rs.getInt(“Quantity”)); 

19.} 

20. 

} catch (SQLException se) { 

21. 

System.out.println(“Error”); 

22. 

Assume that: 

The required database driver is configured in the classpath. 

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

The SQL query is valid. 

What is the result? 

A. An exception is thrown at runtime. 

B. Compilation fails. 

C. The code prints Error. 

D. The code prints information about Item 110. 

Answer:


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


Q7. Given: 

What is the result? 

A. 6 7 8 

B. 7 8 9 

C. 0 1 2 

D. 6 8 10 

E. Compilation fails 

Answer:


Q8. Given the code fragment: 

Stream<Path> files = Files.walk(Paths.get(System.getProperty(“user.home”))); 

files.forEach (fName -> {//line n1 

try { 

Path aPath = fName.toAbsolutePath();//line n2 

System.out.println(fName + “:” 

+ Files.readAttributes(aPath, Basic.File.Attributes.class).creationTime 

()); 

} catch (IOException ex) { 

ex.printStackTrace(); 

}); 

What is the result? 

A. All files and directories under the home directory are listed along with their attributes. 

B. A compilation error occurs at line n1. 

C. The files in the home directory are listed along with their attributes. 

D. A compilation error occurs at line n2. 

Answer:


Q9. Given: 

Which two classes use the shape class correctly? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

E. Option E 

F. Option F 

Answer: B,E 

Explanation: When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class (E). However, if it does not, then the subclass must also be declared abstract (B). Note: An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed. 


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