Question d’entretien chez Morgan Stanley

What are generics?

Réponse à la question d'entretien

Utilisateur anonyme

12 sept. 2017

Generics help represent the type that is contained in a container class like List or Map so that the compiler can infer type information and provide compile time checks. It also helps remove type casting boilerplate. I gave example code with both generics and non generics syntax to highlight the difference