I would like an object to be comparable (to use it in a TreeSet in that case).
My object got a name field and I would like it to be sorted by alphabetical order.
return name.compareTo(otherObject.name);
String already implements Comparable so you don't need do to anything.
Comparable