01: package test12;
02:
03: public class CCTest12 {
04:
05: public static void main(String[] args) {
06: List<String> l; //Check the CC after <
07:
08: l = new List<String>(); //Check the CC after <
09:
10: l.add("Hello, world"); //Check the signature of the method provided by the CC
11:
12: l.get(0).indexOf("Hello"); //Check the methods provided after the second dot. Check the type of the variable l shown after the first dot.
13: }
14:
15: private static class List<T> {
16: public void add(T t) {
17: //nothing...
18: }
19:
20: public T get(int index) {
21: return null;
22: }
23: }
24: }
|