Created
March 11, 2010 03:14
-
-
Save Mistat/328774 to your computer and use it in GitHub Desktop.
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
| package sample; | |
| /** | |
| * ■[java] java 修得度問題 (2) | |
| * @see http://d.hatena.ne.jp/Aileron/ | |
| */ | |
| class A | |
| { | |
| static interface AA | |
| { | |
| String value(); | |
| } | |
| enum B implements AA | |
| { | |
| A { | |
| public String value(){ | |
| return "hoge"; | |
| } | |
| }, | |
| B { | |
| public String value(){ | |
| return "fuga"; | |
| } | |
| }, | |
| C { | |
| public String value(){ | |
| return "hogehoge"; | |
| } | |
| }; | |
| private B() | |
| { | |
| } | |
| } | |
| /** | |
| * | |
| * | |
| * @param args | |
| */ | |
| public static void main(final String... args) | |
| { | |
| System.out.println(B.A.value()); | |
| System.out.println(B.B.value()); | |
| System.out.println(B.C.value()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment