using enumerations in java syntax