Consider the example:
enum SomeEnum {
VALUE1(\"value1\"),
VALUE2(\"value2\"),
VALUE3(\"value3\")
;
private String value;
private SomeEnu
You can't do
SomeEnum.VALUE1 = "Value4";
System.out.println(SomeEnum.VALUE1);
but you can do
SomeEnum.VALUE1.value = "Value4";
System.out.println(SomeEnum.VALUE1);
and value
really changes, but not the static final VALUE1.
Also, since value is private, why can I access it outside other classes?
You can access a private field in an outer/inner class, but I cannot find an example of where you can access it from another class (in the same package for example).