Skip to content

Instantly share code, notes, and snippets.

@yuroyoro
Created March 10, 2010 07:11
Show Gist options
  • Save yuroyoro/327616 to your computer and use it in GitHub Desktop.
Save yuroyoro/327616 to your computer and use it in GitHub Desktop.
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