Java doesn&#x27;t have true generics. It uses erasures to emulate this feature. During compilation, template variables are removed and replaced with specific type. I think that&#x27;s why it&#x27;s an issue.