type erasure

In Java, specifying a generic type allows the compiler to enforce proper use of the generic type. However, this is just for compile time. Behind the scenes, the compiler replaces all references to T with Object. In other words, after the code compiles, your generics are actually just Object types. 
This means there is only one class file. There aren’t different copies for different parameterized types. (Some other languages such as C++ work that way.)
This process of removing the generics syntax from your code is referred to as type erasure. Type erasure allows your code to be compatible with older versions of Java that do not contain generics.The compiler adds the relevant casts for your code to work with this type of erased class. For example, you type
```
Robot r = crate.emptyCrate();
```
and the compiler turns it into
```
Robot r = (Robot) crate.emptyCrate();
```