Created
March 10, 2010 07:11
-
-
Save yuroyoro/327616 to your computer and use it in GitHub Desktop.
This file contains 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; | |
/** | |
* http://d.hatena.ne.jp/Aileron/20100310/1268184123の(2) | |
*/ | |
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) | |
{ | |
sample.A<Integer>.B<String> b = (new sample.A<Integer>()).new B<String>(); | |
b.a = 20; | |
b.b = "test"; | |
b.out(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment