I have seen this code, an am unsure how it works with the compareTo. Could someone guide me through how it works?
public enum Test
{
POTATO("Potato"),
TOMATO("Tomato"),
CARROT("Carrot")
public String Name;
private Test(String name) {
this.Name = name;
}
public boolean testFor(Test t)
{
if (compareTo(t) <= 0) {
return true;
}
return false;
}
}