Sort collection of objects in HashMap based on the object's variable
- by chandra wibowo
I have a collection of book objects in a HashMap. The book has book_title, book_author, book_year_published, etc. I want to sort them based on the book_title which is a String, in both ascending and descending order, and display them on the screen.
I wish someone can help me - I have been doing this for hours and still havent come up with a solution. Thanks in advance.