Free Oracle 1Z0-805 Exam Dumps Questions & Answers
| Exam Code/Number: | 1Z0-805Join the discussion |
| Exam Name: | Upgrade to Java SE 7 Programmer |
| Certification: | Oracle |
| Free Question Number: | 90 |
| Publish Date: | Aug 04, 2026 |
| # of views: | 2583 |
|
|
|
Given this code fragment:
ResultSet rs = null;
try (Connection conn = DriverManager. getConnection (url) ) {
Statement stmt = conn.createStatement();
rs stmt.executeQuery(query);
//-.. other methods } } catch (SQLException se) {
System.out.println ("Error");
}
Which object is valid after the try block runs?
Given the code fragment:
public void processFile() throws IOException, ClassNotFoundException {
try (FileReader fr = new FileReader ("logfilesrc.txt");
FileWriter fw = new FileWriter ("logfiledest.txt")) {
Class c = Class.forName ("java.lang.JString");
}
}
If exception occur when closing the FileWriter object and when retrieving the JString class object,
which exception object is thrown to the caller of the processFile method?