on point 4. is every BookStore object created not an ArrayList of Book obj.? going by the constructor.
No. Every BookStore object contains
an ArrayList called Books. Constructors create an instance of a class. In your case, they create an instance of BookStore called searchMatches. The constructor also happens to instantiate an ArrayList called Books. That doesn't make the class an ArrayList.
i've never returned an ArrayList before & need to know what way to go about doing it
I am not just going to tell you because this is something you need to figure out and understand. Once you understand it will be so blatantly obvious what you need to do that you will no longer need help with this particular concept. Returning an ArrayList is no different than returning any other Object.
Right now, you are returning an Object. If your method signature was like this:
public BookStore searchByTitle(String search)
You would no longer have a compiler error.
1. What variable name is given to your ArrayList?
2. Return it.
I'll give you a small piece of sample code.
public class Foo
private Int i;
private String s;
int = 5;
string = "5";
public String getString()
public Int getInt()