Question: In this tutorial on [reflection](http://docs.oracle.com/javase/tutorial/reflect/member/fieldTypes.html) it states: 

> 
> [...] because generics are implemented via type erasure which removes all information regarding generic types during compilation
> 
> 
> 

My knowledge was that generics are used so that at compile time the compiler can check for type safety. i.e fail fast approach.
But the link mentions that type erasure removes generic information during compilation.

Answer: 
It means, when it is being converted into bytecode. For checking whether correct types are used or not, generics are used. But at the time of bytecode generation, information is removed
In java, Generics is just a place holder. Java Run Time doesn't have any clue about the generics. It's all a compile time trick.

Setting up generics is exactly similar to the scenario, when you declare a field attribute in a class as

* Object (When you just declare type as `T`)
* MyObject (When you declare type as `T extends MyObject`).

After compilation, all would be wired according to the types. That's what is known as **Type Erasure**.