Suppose that you have a table animal with three rows.
The names in those rows are SQL, Javascript, and Java.
What does the following output?.
String sql = "select name from animal order by id"; try (Connection conn = DriverManager.getConnection("jdbc:derby:zoo"); Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(sql)) { rs.absolute(0); rs.next(); System.out.println(rs.getString(1)); }
A.
The call to absolute(0) moves the cursor to a location immediately before the results, and then next()
goes to the first row, so the answer is choice A.