Why do generics often use T?

前端 未结 8 872
故里飘歌
故里飘歌 2020-12-17 18:08

Is there any reason for the use of \'T\' in generics? Is it some kind of abbreviation? As far as I know, everything works. For example

public G Say         


        
8条回答
  •  伪装坚强ぢ
    2020-12-17 18:28

    There might also be a bit of tradition too as C++ templates use T most of the time, and generics are similar in function to C++'s templates, when used for generic programming.

提交回复
热议问题