Generics were added very late in Java (J2SE 5) and one of the challenges with it was to maintain backward compatibility. Type erasureĀ is a technique that the language and runtime designers chose to overcome this problem. Here is a simple demonstration of type erasure in action. import java.util.ArrayList; import java.util.List;   public class Erasure { public static void main(String args[]) { List<String> ls = new ArrayList<String>(); System.out.println(ls.getClass().getName());   List l.. Read More