Why are generics called generics?

后端 未结 9 870
野性不改
野性不改 2021-02-04 00:48

At the risk of becoming the village idiot, can someone explain to me why generics are called generics? I understand their usage and benefits, but if the definition of generic i

9条回答
  •  渐次进展
    2021-02-04 01:52

    A class which takes objects is NOT generic, it is very specifically taking a type which is itself a generic type. A generic class, on the other hand, can be used with any specific type.

提交回复
热议问题