2017  Kodetalk | Feedback | Privacy Policy | Terms | About

In Java Generics won't support primitive Types

I hope many of us aware that Generics are completely free of primitive types. Its not at all support any kind of primitive data types into to. But I want the reason why? Is there any specific reason available for this? If yes, then what are those reason please explain.

In java to provide backward compatibility and to get back the result need to return always object rather that returning primitive type. Generics in java always been checked at compile time. For more detailed information probably you wold like read this

Answer is