package emp;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * Gets all the JSON values from the employee table.
 * 
 * <p>
 * Run first: {@link CreateTable}, {@link Insert}
 * </p>
 */
public class GetAll {

    public static void main(String[] args) throws SQLException {
        Connection con = DriverManager.getConnection(args[0]);
        Statement stmt = con.createStatement();
        
        ResultSet rs = stmt.executeQuery("SELECT data FROM emp");
        
        while (rs.next()) {
            String text = rs.getObject(1, String.class);
            System.out.println(text);
        }
        
        rs.close();
    }

}

@@ -377,16 +377,21 @@
         
+try (
 Connecti
@@ -435,18 +435,24 @@
 args%5B0%5D)
-;%0A
+) %7B%0A    
         
@@ -491,33 +491,41 @@
 ment();%0A        
+  
-%0A
+  %0A    
         ResultSe
@@ -574,33 +574,41 @@
  emp%22);%0A        
-%0A
+    %0A    
         while (r
@@ -631,16 +631,20 @@
         
+ 
+   
 String t
@@ -692,16 +692,20 @@
         
+    
 System.o
@@ -730,18 +730,26 @@
         
-%7D%0A
+    %7D%0A    
         
@@ -757,16 +757,20 @@
         
+    
 rs.close
@@ -769,21 +769,31 @@
 rs.close();%0A
+        %7D%0A
     %7D%0A%0A%7D%0A

add try with resources