Good day.
There is an example of a method that sorts a list, in which the static methods sort() and reverseOrder() . They are written with reference to the Collections class:
Collections.sort(copy, Collections.reverseOrder()); If the sort() method is found in many classes and you cannot do without a specifying reference to Collections , then the reverseOrder() method is presented only in one instance. Why, in this case, write:
Collections.sort(copy, reverseOrder()); will be wrong?
Thank you.
Collections.sort(copy, reverseOrder());is in which class code? What is a contact? - Igor