Java Magic. Part 4: Sun.misc.Unsafe
Java is a safe programming language and prevents programmer
from doing a lot of stupid mistakes, most of which based on memory management.
But, there is a way to do such mistakes intentionally, using Unsafe class.
A new JEP Candidate proposes to facilitate the handling of type variance in Java. The new proposal, potentially targeting Java 10, would add a means for specifying the default variance in the definition of generic types, different to the current style of ...Read more »