import java.sql.*; /* * this class dispalys the result requested by the user */ public class ResultDisplay { public static void display(ResultSet rs) { try { if(rs==null) return; int count=0; while (rs.next ()) count++; System.out.println("# of rows: " + count); } catch (SQLException se) { System.out.println("Error in iterating over the ResultSet: in class ResultDisplay"); se.printStackTrace(); } } }