Ich bin neu in der JDBC- und DAO-Programmierung.
also habe ich eine Frage zu den möglichen Anwendungsfällen bei Try-with-Ressourcen.
Code: Select all
try(Connection conn = DatabaseConnection.getConnection();
Statement stmt = conn.createStatement();
PreparedStatement pstmt = conn.prepareStatement()) // is this allowed?
{
}
catch (SQLException e){
e.printStackTrace();
}
- Ist so etwas überhaupt erlaubt?
Mobile version