public class Example1
{
    public enum LetterGrade
    {
       F, D, DPLUS, CMINUS, C, CPLUS, BMINUS, B, BPLUS, AMINUS, A;       
    }

    public static void main(String[] args)
    {
       LetterGrade      first, second;
      
       first  = LetterGrade.BMINUS;
       second = LetterGrade.BPLUS;

       if (second.compareTo(first) > 0) System.out.println(second + " is better");
       else                             System.out.println(first + " is better");
    }
}
