Question 101 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question 101 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question

Given the code fragment:

10. try {

1a Connection conn = DriverManager.getConnection(dbURL, userName, passWord);
12. String query = "SELECT * FROM Employee WHERE ID = 110";

is. Statement stmt = conn.createStatement ();

14. ResultSet rs = stmt.executeQuery (query) +

1s. System.out.printIn("Employee ID: " + rs.getInt("ID"));

16. } catch (Exception se) {

7. System. out .printIn ("Error"

ie. }

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 table has a column ID of type integer and the SQL query matches one record.

What is the result?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A.