Guest User

Untitled

a guest
Jul 16th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. class A<T> {
  2. private class B {
  3. int x;
  4. }
  5. B instance;
  6. A() {
  7. instance = new B();
  8. }
  9. void f(A p) {
  10. instance = p.instance;
  11. }
  12. }
  13.  
  14. public static void main(String[] args)
  15. {
  16. A<T1> x = new A<T1>();
  17. x.f(new A<T2>());
  18. }
Add Comment
Please, Sign In to add comment