Kamal Tripathi wrote:how is "type erasure" effective...
Type erasure is effective at allowing us to mix legacy code with generics code, however, due to the design of your code, mixing legacy code with generics code will lead to an 'ambiguity' compiler error.
Kamal Tripathi wrote:...when it is required at runtime
It is not required at runtime. At compile time, the compiler removes all information related to type parameters and type arguments. It is able to do this because this information is not required at runtime. At compile time, the compiler decides which overloaded method will be called.