SyntaxFix
Write A Post
Hire A Developer
Questions
Inside your for-loop, just add the following line:
if(books[i] != null) { total += books[i].getPrice(); }