Created
March 10, 2010 07:57
-
-
Save Mistat/327659 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; | |
| import java.util.ArrayList; | |
| /** | |
| * ■[java] java 修得度問題 (1) | |
| * ひねくれてみた | |
| * @see http://d.hatena.ne.jp/Aileron/ | |
| */ | |
| class A<A> | |
| { | |
| class B<B> | |
| { | |
| public void out() | |
| { | |
| System.out.print(a); | |
| System.out.print("-"); | |
| System.out.println(b); | |
| } | |
| private A a; | |
| private B b; | |
| } | |
| /** | |
| * @param args | |
| */ | |
| public static void main(final String... args) | |
| { | |
| new sample.A<String>() { | |
| @Override | |
| public String toString() { | |
| B<String> b = new B<String>(); | |
| b.a = "20"; | |
| b.b = "test"; | |
| b.out(); | |
| return null; | |
| } | |
| }.toString(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment