This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
"One of the notable features of Java generics is the erasure of generic types in the virtual
machine. Perhaps surprisingly, the erased classes still retain some faint memory of their
Core Java Vol I (8th Ed) P. 641
Somehow this reminds me of weak references, is this correct?
Can we read this information somehow?
I assume it has to do with the fact that when you compile the code, the bytecode still knows that it is generic, so if you write new code that interacts with this compiled class, it will be able to perform type safety checks, as opposed to compiled code that used raw types. All the erasure actually takes place right before run time. This is when all generic information is discarded.