I need to sort a java list containing objects of type Hotel
List<Hotel> hotelList = new ArrayList<>();
Inside the class I do have the method
@Override
public List<Room> getAvailableRooms() {
return this.rooms;
}
I need to sort my hotelList by the price
attribute found in Room class.
Any suggestions?