Suppose that you have a table named animal with two rows. What is the result of the following code?
6: Connection conn = new Connection(url, userName, password); 7: Statement stmt = conn.createStatement(); 8: ResultSet rs = stmt.executeQuery("select count(*) from animal"); 9: if (rs.next()) System.out.println(rs.getInt(1));
C.
A Connection is created using a static method on DriverManager.
It does not use a constructor.
Therefore, choice C is correct.
If the Connection was created properly, the answer would be choice B.