Construct the program

Report a typo

Construct the program for establishing the connection to the database using JDBC.

Use < and > to adjust a code tabulation.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                SQLiteDataSource dataSource = new SQLiteDataSource();
              
                System.out.println("Connection is valid!");
              
                e.printStackTrace();
              
                }
              
                }
              
                dataSource.setUrl("jdbc:sqlite:monsters.db");
              
                } catch (SQLException e) {
              
                try (Connection con = dataSource.getConnection("admin", "admin")) {
              
                if (con.isValid(3)) {
              
___

Create a free account to access the full topic