Vote count:
0
I am making a method that will get the total number of items that a customer has in Java Queue , The customer has 3 attributes , customerNumber , numItems and total . I have initated all the customer and assigned them to queues , but when I run the program I get the NullPointerException . here is the code
public int getTotalItems()
{
int TotalItems = 0;
for(int i=1;i< 10; i++)
{
TotalItems = TotalItems + queArray[i].getNumItems() ;
}
return TotalItems;
}
need help desperately ,
asked 33 secs ago
nullPointerException in Java Queues
Aucun commentaire:
Enregistrer un commentaire