Question: How can i use Comparator while using an Iterator (Java) I have a class called book that has a method that returns a comparator public
How can i use Comparator while using an Iterator (Java)
I have a class called book that has a method that returns a comparator
public Comparator
in my driver, im trying to iterate through my list, but I need to use the comparator to sort them. How can I do this without using Collections.sort() or Arrays.sort()?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
