Hello,
I just want to know how to use arraylist in Java.
What I mean is, if I have 2 class(Book, and main class).
How to use the arraylist to construct new book?
Thank you
//create new object
Book[] BookList = new Book[MAX_SIZE];
//constructing 5 book object
BookList[0]= new Book("Absolute Java","Savitch",5,true);
BookList[1] = new Book("JAVA: How to Program","Deitel and Deitel",0,true);
BookList[2] = new Book("Computing Concepts with JAVA 3 Essentials","Horstman",5,false);
BookList[3] = new Book("Java Software Solution","Lewis and Loftus",5,false);
BookList[4] = new Book("Java Program Design","Cohoon and davidson",1,true);