i got this question from the SCJP 5 book. can some one please explain to me why the value 10 has been put in the line of the code which i have commmented out below. and how does the comapre method check the Integers to determine that they must go in reverse order? i just do not understand the logic behind the compare method. please help
import java.util.*;
class pq { static class pqsort implements Comparator<Integer>{ public int compare(Integer one, Integer two){ return two - one;
Please don't cross-post. It makes people reluctant to spend time helping when they realize the question has already been answered in another forum. Since this is from an SCJP book, please continue this discussion under the cross-post in the SCJP forum.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org