I hope this helps you . Your compareTo method breaks the contract for that method in two ways. 1) Transitivity says that if x.compareTo(y) > 0 and y.compareTo(z) > 0 then x.compareTo(z) > 0. Your method breaks this because 5 > 4 and 4 > 1, but 5>1 is not one of your rules.
:except options in routes that contain collections and members not working
By : user3223567
Date : March 29 2020, 07:55 AM
Hope that helps A simpler way to eliminate unneeded routes is by specifying the :only option
help you fix your problem I am new to java. I am writing a code which sorts the given pairs on the basis of it's first letter. I am using Collections.sort() to sort the pairs but somehow it's not being sorted. I am unable to figure out what's causing the problem. Please check the code below. . , You have wrong implementation of compare method. Try it: