In Java, type erasure implements generic code by replacing a type parameter with its bound, or
Object if unbounded, while inserting required casts and bridge methods. Thus List<String> and List<Integer> share a runtime list class even though the compiler checks different element types. Some generic type information remains in metadata for reflection, so erasure does not mean every trace of generic declarations disappears. Restrictions such as the inability to directly create new T() follow from the absence of a distinct reified runtime class for arbitrary type arguments.[ref]https://docs.oracle.com/javase/tutorial/java/generics/erasure.html. Oracle, Type Erasure: replacement, casts and bridge methods
// Target: computer-science.bigb
New to topics? Read the docs here!