Here you can find the source of printValues(final ResultSet resultSet)
public static void printValues(final ResultSet resultSet) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static void printValues(final ResultSet resultSet) throws SQLException { while (resultSet.next()) { for (int i = 1; i < resultSet.getMetaData().getColumnCount(); i++) { System.out.print(resultSet.getString(i)); System.out.print("\t"); }/* w w w. j a va2s .co m*/ System.out.println("\n"); } } }