test/tools/javac/enum/EnumPublicConstructor.java

Print this page

        

*** 25,35 **** * @test * @bug 5009601 * @summary enum constructors cannot be declared public or protected * @author Joseph D. Darcy * ! * @compile/fail -source 1.5 EnumPublicConstructor.java */ enum EnumPublicConstructor { RED(255, 0, 0), GREEN(0, 255, 0), --- 25,35 ---- * @test * @bug 5009601 * @summary enum constructors cannot be declared public or protected * @author Joseph D. Darcy * ! * @compile/fail EnumPublicConstructor.java */ enum EnumPublicConstructor { RED(255, 0, 0), GREEN(0, 255, 0),