From what I read, HashSet stores data in a unsorted manner. However I was given this question . (I don't want anyone to solve it)
Write a program to keep car details in a HashSet with sorted manner on the based of car name using comparator. Also calculate which car have maximum and minimum speed And average speed of all car.car class structure could be like.Also consider exception scenarios
(car is a class that has a element name)
I am confused now. Is it possible the question is slightly wrong? If so can anyone help me in figuring the correct question?