posted 3 years ago
Option D says "The code does not compile due to line s2."
But in code there is no such line with a comment //s2
var url = "jdbc:derby:bunnies";
var sql = "INSERT INTO bunny(name, color) VALUES (?, ?)";
try (var conn = DriverManager.getConnection(url);
var stmt = conn.prepareStatement(sql)) { // s1
stmt.setString(1, "Daisy");
stmt.setString(2, "Brown");
stmt.executeUpdate();
stmt.setString(1, "Cinna");
stmt.setString(2, "Brown");
stmt.executeUpdate();
}