@@ -0,0 +1,693 @@
+package com.valerysamovich.java.trail.generics.whygenerics;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class GenericsExample %7B%0A%0A    @SuppressWarnings(%22unchecked%22)%0A    public static void main(String%5B%5D args) %7B%0A        %0A        // Example with cast (no generics)%0A        @SuppressWarnings(%22rawtypes%22)%0A        List castList = new ArrayList();%0A        castList.add(%22hello%22);%0A        String s1 = (String) castList.get(0);%0A        System.out.println(s1);%0A        %0A        // Example with generics (no cast)%0A        List%3CString%3E genericList = new ArrayList%3CString%3E();%0A        genericList.add(%22hello%22);%0A        String s2 = genericList.get(0);%0A        System.out.println(s2);%0A%0A    %7D%0A%0A%7D%0A

Add cast/generic example