You're quite welcome! Glad you've got it working.
Type: Posts; User: curmudgeon
You're quite welcome! Glad you've got it working.
Yep, that's what the Queue API states:
You could call peek and check that it's not null before proceeding:
Customer cust = customerQueue.peek();
if (cust != null) {
// do check the...
So what is null? consider changing this:
customerQueue.peek().minutePassed();
to this:
// add before checking the minutes passed:
System.out.println("customerQueue is null: " +...
You should *always* also post the full text of the exception and indicate by an obvious comment on the code which line(s) throw the exception. Please do this as this will greatly help us to figure...