L
Lew
Daniele said:If I were so inclined, I would argue that no, in the first case
"constant" is a noun, in the second an adjective, and that in the
clear-cut language of the JLS the noun 'constant' has a stringent
definition and the adjective 'constant', in the context of variables,
too, but that these definitions don't match.
What? This isn't about linguistics, this is about the fact that
constant variables are compiled as literal constants.
The notion of adjective and noun have no bearing on the technical
facts. Why would you bring that in?
But I won't, because I consider this whole issue a complete waste of
time, and only had responded to correct my inaccuracies, not to drive
any point.
Both constant variables and constants are compiled as constants. So
the difference is not any difference. BOTH are constants, no matter
how you look at the definition.
If you look into the bytecode and see the constant "false" (whatever
that is in bytecode), do you call that an adjective or a noun?
Because that's what's there in both examples.
BOTH are constants.