<div dir="auto">Hello Amber Dev Team,<div dir="auto"><br></div><div dir="auto">In Java 23 JLS 15.29, it says that a constant expression can only be made up of primitive LITERALS, String LITERALS, a couple of operations, and CONSTANT VARIABLES.</div><div dir="auto"><br></div><div dir="auto">The word LITERAL means that, for strings, I need to put in the full double quotes (or triple double quotes for textblocks) in order to qualify.</div><div dir="auto"><br></div><div dir="auto">And the word constant variable is defined in 4.12.4. "A constant variable is a variable of primitive type or type String that is initialized with a constant expression", which is what 15.29 is, mentioned above.</div><div dir="auto"><br></div><div dir="auto">Now, to my question -- are there any downsides or obstacles to adding Enum.name() to this list of constant expressions?</div><div dir="auto"><br></div><div dir="auto">Enum.name() is a final method, and we know for a fact that, if the class compiles, then it ALWAYS outputs the same value. And therefore, it seems like it aligns nicely with the goals and intents of constant variables. Is there anything bad or wrong about adding <a href="http://enum.name">enum.name</a>() to the list?</div><div dir="auto"><br></div><div dir="auto">I do see some ways that it would provide value, but for now, I just want to get an idea of if it would be bad or wrong to do before seeing if it is worth it at this point in time.</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">Finally, apologies for not having done any preview feature testing lately. I have been juggling personal and work emergencies nonstop. Only recently had a chance to poke my head out from the bomb shelter, and I'm probably going to jump back in shortly.<br></div><div dir="auto"><br></div><div dir="auto">Thank you for your time and help.</div><div dir="auto">David Alayachew</div></div></div>