Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Foo<T>
- {
- T t;
- public T getT()
- { return t; }
- }
- public class Bar<T> extends Foo<Qux>
- {
- T anotherT;
- public T getOtherT()
- { return anotherT; }
- }
- public class SomeClass
- {
- public static void someMethod()
- {
- Bar<Buzz> bar; // which extends Foo<Qux>
- bar.getT();
- // This method call returns Object rather than Qux?
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment