ResultSet getters

Report a typo

Given the table:

Ship names and their fate

What is the output of the following code?

try (ResultSet ships = statement.executeQuery("SELECT * FROM SHIPS")) {
    ships.next();
    String id = ships.getInt("ID");
    String name = ships.getString("Name");
    String fate = ships.getString("Fate");

    System.out.println(fate);
}
Select one option from the list
___

Create a free account to access the full topic