01: package test;
02:
03: public class Test<X extends Number, Y extends RuntimeException> extends
04: java.util.AbstractList<X> {
05:
06: private X singleton;
07:
08: public X get(int index) {
09: return singleton;
10: }
11:
12: public int size() {
13: return 1;
14: }
15:
16: public static void main(String... args) {
17: Generics<? extends Number> tn;
18: Generics<Integer> ti;
19: ti.get(0).intValue();
20: tn.get(0).intValue();
21: }
22: }
|