Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A ...
- class B extends A ...
- class C extends A ...
- String foo() ...
- String bar(A a) ...
- String r = (new B()).foo();
- String r = (new B()).bar(new C());
- A fred;
- List as = new LinkedList();
- for (A a : as) ... fred.bar(a); ...
- class A<T,U,V> ...
- class B<T> extends A<T,Void,Object> ...
- class C<N> extends A<String,Void,Object> ...
- T foo() ...
- String r = (new A<String,Void,Object>()).foo();
- String r = (new B<String>()).foo();
- String r = (new C<Integer>()).foo();
- String r = (new B<String>()).foo();
- String r = (new B<String>()).bar(new C<Integer>());
- A<String,String,Integer> fred;
- List<A<String,String,Integer>> as = new LinkedList<>();
- for (A a : as) ... fred.bar(a); ...
Add Comment
Please, Sign In to add comment