Efficient way to Handle ResultSet in Java
Iterate over the ResultSet Create a new Object for each row, to store the fields you need Add this new object to ArrayList or Hashmap or whatever you fancy Close the ResultSet, Statement and the DB connection Done EDIT: now that you have posted code, I have made a few changes to it. public List … Read more