I have several calls to Enum
DogStatus in my code, like this:
if(DogStatus.SLEEPING){
//do something
}
How can I set up a constant
of the Enum
in my class, so that I don't need to alter all of them each time I want to change the if condition
?
E.g. something like:
constant statusToCheck = DogStatus.SLEEPING