I thought that only static import can be used to import static members of a class. And enums are static by default. In the below code, I can replace the 'static import' with a normal import to use the enum which is defined inside EnumClass. Still it works fine. Why so ?
The 'static import' construct is only a convenience. It is never required.
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
posted 10 years ago
Thanks, but what I meant to ask is that there are some things you can do with static imports and not with normal imports - like importing static methods and variables of a class. But in the case of enums (as class members),both imports work, why is it so ? [ September 13, 2005: Message edited by: Sreedevi Vinod ]