Oracle
1Z0-805 · Question #25
1Z0-805 Question #25: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-805 to reveal the answer and full explanation for question #25. The question stem and answer options stay visible for context.
Question
Given the code fragment: try { String query = "SELECT * FROM Employee WHERE ID=110"; Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(query); // Line 13 System.out.println("Employee ID: " + rs.getInt("ID")); // Line 14 } catch (Exception se) { System.out.println("Error"); } Oracle 1Z0-805 Exam Assume that the SQL query matches one record. What is the result of compiling and executing this code?
Options
- AThe code prints error.
- BThe code prints the employee ID.
- CCompilation fails due to an error at line 13.
- DCompilation fails due to an error at line 14.
Unlock 1Z0-805 to see the answer
You've previewed enough free 1Z0-805 questions. Unlock 1Z0-805 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.