Having an enum declared within a class:
Code: Select all
public class EnumKindOfThing{
public enum Days{MONDAY,SUNDAY};
}
import static EnumKindOfThing.Days.*;
i know that the enum fields (MONDAY and SUNDAY in this case) are implicitily final and static. Therefore it should work should not it?
PS: At the moment I cannot test it myself as I cannot use my laptop.
I am sure that import static EnumKindOfThing.*; would work as the enum is seen as a static nested class. However I would like to know the exact above posted example.
Thanks in advance.