hello everyone i have three class

im new in programming i trying to connect to the database and retrieve data to display
in the Eserver.java file i have all the database connection and sql query and the prouct.java file is the structure of the products and product collection have vector structure to hold any data retrieve in the database im having problem to create an object to hold the record set.

rs = query.executeQuery(queryString);
// Create collection of products
pColl = new ProductCollection();
// Process the rows that have been extracted
// Place them in pColl
Product extractedProduct;


how can create an object in the while loop to store the rs query data thank you