What exactly you are supposed to do in that exercise?
part of it is to implement compareTo(Hand other) method to class Hand, so that different hands can be compared and hands could be sorted.
And as we want to be able to sort those, the java way of accomplishing it is to implement interface Comparable<T> and then compareTo(T other)
(T == Type. In the case of card Card and now in the case of hand Hand)
Just like in Card, you can use this as the reference to the current object also in when implementing compareTo to Hand.