This is the newest code, and it does print something, just not what I need:
Code:
public void printInventoryExceptions(int quantity)
{
int maxID = stock.length;
boolean notFound = true;
Product temp = null;
for (int i = 0; i < maxID && notFound; i++) {
if ((stock[i] != null)){
notFound = false;
temp = stock[i];
quantity = temp.getQuantity();
}
}
System.out.println("There are " + quantity + " " + " product ID " + stock.length );
}
The code is now printing "There are 100 product ID 1", which is not what I need, but at least it's printing something. I need it to print anything less than 100 and the name of the product, but I don't know how to add the name of the product.