I'm new to java, i tried to print all data in the table
Statement stmt=connection.createStatement();
String sql ="INSERT INTO contacts(name,email)VALUES('ABC','ABC@yahoo.com')";
stmt.execute(sql);
ResultSet rs=stmt.executeQuery("SELECT*FROM contacts");
System.out.println(rs.getString("name"));
and got
Exception in thread "main" org.h2.jdbc.JdbcSQLException: No data is available [2000-173]