Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A<T> {
- private class B {
- int x;
- }
- B instance;
- A() {
- instance = new B();
- }
- void f(A p) {
- instance = p.instance;
- }
- }
- public static void main(String[] args)
- {
- A<T1> x = new A<T1>();
- x.f(new A<T2>());
- }
Add Comment
Please, Sign In to add comment