Skip to content

Instantly share code, notes, and snippets.

@Mistat
Created March 11, 2010 03:14
Show Gist options
  • Select an option

  • Save Mistat/328774 to your computer and use it in GitHub Desktop.

Select an option

Save Mistat/328774 to your computer and use it in GitHub Desktop.
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