Consider the following code snippet.
Assume that DbConnector.connectToDb0 returns a valid Connection
object and that the contact table has an entry with the value "Michael"
in the firstName column:
ResultSet resultSet = null;
try (Connection connection = DbConnector.connectToDb
Statement statement = connection.createStatemen
resultSet = statement.executeQuery("SELECT * FROM contact WHERE firstName
LIKE 'M%'"); // #LINE1
}
while (resultSet.next()){ //#LINE 2
// print the names by calling resultSet.getStrinh("firstName"));
}
Answers
Answered by
0
Answer:
ihjkfhj
Explanation:
kfkjku8j9o
Similar questions