Sort collection of objects in hashmap based on the object's variable in java
- by chandra wibowo
hi everyone, i have a collection of book object 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