How should I handle Exception in this scenario
问题 Hi there I am learning OOP by writing a dummy Library management project in Java. In serachBook(), if book is found in ArrayList, it returns book object, if not found it throws custom exception BookNotFound. Question 1: Should it just return null and check the returned value at calling code for null or throw custom exception BookNotFound. Currently I believe BookNotFound is appropriate and am currently doing it. However I am finding one more difficulty: In addbook(), I first call searchBook()