Free Oracle 1Z1-805 Exam Dumps Questions & Answers
| Exam Code/Number: | 1Z1-805Join the discussion |
| Exam Name: | Upgrade to Java SE 7 Programmer |
| Certification: | Oracle |
| Free Question Number: | 90 |
| Publish Date: | Aug 15, 2026 |
| # of views: | 2204 |
|
|
|
Given this code fragment:
try {
String query = "SELECT * FROM Item";
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
int rowCount = rsmd.getRowCount();
System.out.println ("Processing: " + rowCount + " rows.");
while (rs.next()) {
// Process each row
}
} catch (SQLException se) {
System.out.println("Error");
}
Assume that the SQL query returns records. What is the result?
Given:
Which design pattern moves the getPerson, createPerson, deletePerson, and updatePerson methods to a new class?
Given the code fragment:
String query = "SELECT ID FROM Employee"; \\ Line 1 try (Statement stmt = conn.CreateStatement()) { \\ Line 2 ResultSet rs = stmt.executeQuery(query); \\ Line 3 stmt.executeQuery ("SELECT ID FROM Customer"); \\ Line 4 while (rs.next()) { \\process the results System.out.println ("Employee ID: " + rs.getInt("ID") ); } } catch (Exception e) { system.out.println ("Error"); }
Assume that the SQL queries return records. What is the result of compiling and executing this code fragment?
Given:
public class StringApp {
public static void main(String[] args) {
String[] str="Java SE,java EE,Java ME,java FX".split(",");
int count=0;
for(int i=0;i<str.length;i++) {
switch(str[i]) {
case "Java SE":
count++; continue;
case "Java EE":
count++; break;
case "Java ME":
count++; break;
case "Java FX":
count++; break;
}
}
System.out.println("Total match found="+count);
}
}
What is the result?