Java 5 introduced enum that solve the problem with enumeration. Groovy also support that feature, as shown here. Enum example using Java. enum ShirtSize { SMALL,MEDIUM,LARGE,EXTRALARGE } class ShirtImplementation { public void orderShirt(ShirtSize size) { switch(size) { case SMALL : System.out.println("The size of the shirt is small"); break; case MEDIUM : System.out.println("The size of the shirt is medium"); break; case LARGE : System.out.println("The size of the shirt is large"); break; case EXTRALARGE : System.out.println("The size of the shirt is extra large"); break; default : System.out.println("The shirt size is not available"); break; } } } public class EnumExample { public static void main(String args[]) { ShirtImplementation shirtImplementation = new ShirtImplementation(); shirtImplementation.orderShirt(ShirtSize.SMALL); shirtImplementation.o...