So from my understanding of Java, when you write
return value;
It might actually return one of two things: the value of 'value', or a reference to 'value', depending on what type 'value' is. To my knowledge, if 'value' is a primitive data type, Java returns the value of 'value', and if 'value' is an abstract data type, like a class, then Java returns a reference to 'value'.
Now, what I'm curious about is the behavior of return with enumerations. If 'variable' is of type enum, does a value or a reference get returned?