I was reading this article on Java Generics and there it is mentioned that the constructor for an ArrayList
looks somewhat like this:
class ArrayLis
Good Question.The type checking is done first.If everything compiles(that is,after it has provided compile type safety) does type erasure occur.
Again,lot of things happen as part of type erasure which includes:-
1)Adding casts
2) creating bridge methods
But type checking is done first,everything happens later