// define the possible dog breeds
// This automatically creates three Breed objects to represent the three breeds.
enum Breed { Dalmatian, Labrador, Dachshund}

...

// import to allow dropping the explicit Breed.
import static com.mindprod.dogs.Breed.*;
...

// assignment
Breed cedar = Breed.Labrador;

// prints "Labrador";
System.out.println( cedar );

// Prints 1, Dalmatian is 0.
System.out.println( cedar.ordinal() );

// prints "Dachshund";
System.out.println( Breed.Dachshund ):

// comparison
if ( cedar.compareTo(Breed.Dalmatian) > 0 )
   {
   System.out.println( "Comes after Dalmatian" );
   }

// set to none of the above
cedar = null;

// example iterating over all possibilities
// print out a list of all possible breeds.
for ( Breed dog : Breed.values() )
   {
   System.out.println( dog );
   }

...

// example use of switch
public boolean lap( Breed dog )
   {
   switch ( dog )
      {
      // Note how you do not specify Breed.Dalmatian in case label.
      // Java knows all case labels are Breed., because dog is a Breed.
      case Dalmatian:
      case Labrador:
      default:
         return false;

      case Dachshund:
         return true;
      }
   }

