@@ -0,0 +1,851 @@
+%0D%0Apackage eu.epfc.cours3449.l15.Part2Abstract;%0D%0A%0D%0Aimport java.util.ArrayList;%0D%0A%0D%0Apublic class Generic %7B%0D%0A    public static void main(String%5B%5D args) %7B%0D%0A        ArrayList a = new ArrayList();%0D%0A        a.add(new Object());%0D%0A        a.add(new Integer(10));%0D%0A        a.add(new String(%22hi%22));%0D%0A        for(int i=0; i%3Ca.size(); i++) %7B%0D%0A            System.out.println(a.get(i));%0D%0A            if(a.get(i) instanceof String) %7B%0D%0A                String s = (String) a.get(i);%0D%0A                System.out.println(s.contains(%22hi%22));%0D%0A            %7D%0D%0A        %7D%0D%0A        %0D%0A        System.out.println(%22%22);%0D%0A        ArrayList%3CString%3E s = new ArrayList%3C%3E();%0D%0A        s.add(%22S1%22);%0D%0A        s.add(%22S2%22);%0D%0A        for(int i=0; i%3Cs.size(); i++) %7B%0D%0A            System.out.println(s.get(i));%0D%0A            System.out.println(s.get(i).contains(%22S%22));%0D%0A        %7D%0D%0A    %7D%0D%0A    %0D%0A%7D%0D%0A

Comment Gerneric fonctionne