Why are generics called generics?

后端 未结 9 839
野性不改
野性不改 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:35

    "Generic" is talking about the implementation. You write a single "Generic" list implementation that works with any type, instead of having to write specific implementations for each type you want to use.

提交回复
热议问题