hello everyone I am newto programming and I am just a little bit confused. I have three files in java
Product.java this file defines the product attributes like product name, quantity, ID
in this file i dont have a main
ProductCollection.java
this file create a vector to hold data temporarily when accessing database
Database.java
database connection
EServer
communicate with client and retrieve access database
rs = query.executeQuery(queryString);
pColl = new ProductCollection();<-------------------confuse
product extractedProduct; <------------------------ confuse
while(rs.next())
{
extractedProduct = (Product).addProduct(rs);
// Object [ ] extractedProduct = ProductCollection.addProduct(rs);
}
EClient.java
can someone explain this two line please
[ pColl = new ProductCollection();] [ product extractedProduct;]
also I am struggling to add an object to store the result temporary. Can someone help me please I want extract out the contents of a row and set up a Product object extractedProduct