Originally posted by Burkhard Hassel:
Wasn't it must not be qualified in a case label?
Yours,
Bu.
Good question! That's just the sort of thing that keeps catching me. I read the study guides and learn how things should be done, but it's not always clear whether it's *legal* to do them differently. And then I get a question on a practice exam that breaks one of those rules, and I'm not sure whether that means it won't compile, or just that it would be frowned upon.
E.g. one question that caught me more than once in the Rules Roundup was the one about whether a subclass can define a method that's final in the superclass. I may not be quoting the exact wording correctly, but even if you know that (a) you can create a method with the same signature in the subclass and (b) it won't technically be overriding the method in the superclass, it's still hard to be sure what the particular question has in mind.
But, I digress... !! I just remembered, this
thread is about enums.
(Although my question about enums *is* really just an instantiation of my general trouble with distinguishing "poor coding practice" from "illegal Java code".)
b.
[ September 09, 2006: Message edited by: E McKenney ]