Generics provide for extended code reusability and type safety in your projects. A generic is a class, structure or interface that uses a type parameter as a placeholder for the actual type that it will contain or use. These generic type definitions cannot be instantiated as they are not complete. In its simplest form, it …