What is the difference between returning 0, returning 1 and returning -1 in compareTo() in Java?
What is the difference between returning 0, returning 1 and returning -1 in compareTo() in Java?
Answer in short: (search your situation)
System.out.println(A.compareTo(B)>0?"Yes":"No")
if the value of A>B it will return "Yes" or "No".