Online Access Free 1z0-809 Practice Test

Exam Code:1z0-809
Exam Name:Java SE 8 Programmer II
Certification Provider:Oracle
Free Question Number:209
Posted:Sep 08, 2025
Rating
100%

Question 1

Given the records from the Employee table:

and given the code fragment:
try {
Connection conn = DriverManager.getConnection (URL, userName, passWord); Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); st.execute("SELECT*FROM Employee"); ResultSet rs = st.getResultSet(); while (rs.next()) { if (rs.getInt(1) ==112) { rs.updateString(2, "Jack");
}
}
rs.absolute(2);
System.out.println(rs.getInt(1) + " " + rs.getString(2));
} catch (SQLException ex) {
System.out.println("Exception is raised");
}
Assume that:
The required database driver is configured in the classpath.
The appropriate database accessible with the URL, userName, and passWord exists.
What is the result?

Question 2

Given the code fragment:
LocalDate valentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14);
LocalDate nextYear = valentinesDay.plusYears(1);
nextYear.plusDays(15); //line n1
System.out.println(nextYear);
What is the result?

Question 3

Given:

What is the result?

Question 4

Given the code fragment:
List<String> str = Arrays.asList ("my", "pen", "is", "your', "pen");
Predicate<String> test = s -> {
int i = 0;
boolean result = s.contains ("pen");
System.out.print(i++) + ":");
return result;
};
str.stream()
.filter(test)
.findFirst()
.ifPresent(System.out ::print);
What is the result?

Question 5

Given:
interface Doable {
public void doSomething (String s);
}
Which two class definitions compile? (Choose two.)

Add Comments

Your email address will not be published. Required fields are marked *

insert code
Type the characters from the picture.