sanjay manohar wrote:
> This is an excellent example of how stupid Java's syntax is!
> whoever heard of a monthe being a member of another monthe?
It isn't. The example exhibits the ability in Java to refer to a class
(static) variable or method by means of an expression of the
corresponding type. It is widely regarded as poor style to make use of
this capability, and some go so far as to consider it a misfeature of
the language. The main reason for that is that it is deceptive and
confusing: observe your own apparent misapprehension of the example,
just for starters.
If the months actually were members of each other, by the way, that
wouldn't be a syntax issue. It would be a question of the design of the
new Typesafe Enum feature.
--
John Bollinger