My question is: Is it strictly necessary that when using Comparable we implement the interface on the class itself in which we want to establish the comparison and sort criteria for when we invoke sort () using compareTo ()?
Or could I create another class in which I pass the parameters and it returns what interests me in order? Ask the other way around for Comparator, since the examples they have given me follow that pattern and when I try to do it the other way around it does not seem to work and it has something in me that maybe I'll miss something.