@@ -0,0 +1,959 @@
+package utility;%0A%0Aimport java.sql.ResultSet;%0Aimport java.sql.ResultSetMetaData;%0Aimport java.sql.SQLException;%0A%0A/**%0A * Prints the contents of a ResultSet to System.out%0A */%0Apublic class PrintResultSet %7B%0A    public static void print(ResultSet resultSet) %7B%0A        /* Method based on http://stackoverflow.com/a/28165814/3626537 */%0A        try %7B%0A            ResultSetMetaData resultSetMetaData = resultSet.getMetaData();%0A            int columnsNumber = resultSetMetaData.getColumnCount();%0A            while (resultSet.next()) %7B%0A                for (int i = 1; i %3C= columnsNumber; i++) %7B%0A                    if (i %3E 1) System.out.print(%22,  %22);%0A                    String columnValue = resultSet.getString(i);%0A                    System.out.print(resultSetMetaData.getColumnName(i) +%22: %22 + columnValue);%0A                %7D%0A                System.out.println(%22%22);%0A            %7D%0A        %7D catch (SQLException exc) %7B%0A            exc.printStackTrace();%0A        %7D%0A    %7D%0A%7D%0A

Create PrintResultSet utility method