public Product findProduct(Product searchProduct)
{
Product found = null;
for(Product item : stock) {
if(item.id == searchProduct.id)
{found=item;
break;
}
}
return found;
}
The error code reads: id has private access in Product. I am new at this and do not know how to write it correctly.
Thank you,
ladybritt