Last active
December 15, 2015 20:48
-
-
Save webcane/5320906 to your computer and use it in GitHub Desktop.
EclipseEnumTest - Eclipse compile code but haven't
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class EnumTest { | |
| enum Day { | |
| // The constructor EnumTest3.Day(int) is undefined | |
| Monday(1), Sunday(2) | |
| }; | |
| public static void main(String[] args) { | |
| Day d = null; | |
| System.out.println(d.Monday); | |
| } | |
| } | |
| // null |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
c:\src\enum_\inner>javac EnumTest.javaEnumTest.java:6: error: constructor Day in enum Day cannot be applied to given t
ypes;
Monday(1), Sunday(2)
^
required: no arguments
found: int
reason: actual and formal argument lists differ in length
EnumTest.java:6: error: constructor Day in enum Day cannot be applied to given t
ypes;
Monday(1), Sunday(2)
^
required: no arguments
found: int
reason: actual and formal argument lists differ in length
2 errors