You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Test2.java 408B

12345678910111213141516171819
  1. class Generic1<T extends Number> {
  2. public void foo(T p) { }
  3. }
  4. class Generic2<T extends Number, Y extends Number> extends Generic1<T> {
  5. public void foo2(Y p) {}
  6. }
  7. public class Test2<Y extends Number> extends Generic2<Y,Y>{
  8. public void foo2(Y p) { }
  9. public void foo(Y p) { }
  10. public static void main(String []argv) {
  11. Test2<Integer> t = new Test2<Integer>();
  12. t.foo(7);
  13. t.foo2(9);
  14. }
  15. }