I have an appointment where I need to create an arraylist of BookInventory objects with parameters (String bookNum, String bookTitle, int qoh, double bookPrice). Where bookNum is the debut number of the ISBN of the book. After creating this array, I need to use the Collections class sort method. In my BookInventory class, I have to write compareTo (), which will finish sorting arraylist bookNum (which is String). How can I do it? This is my first experience with this, and I do not understand.
unit
source share