The main aim of Generics introduction was to reduce the ClassCastException at runtime. In Makority of cases it will identify the problem at compile time but the problem (error) can come if you use Collections which are Generic and which are not.
Eg
to overcome this listWithOutGen make is also typesafe.