On the meaning of < E > and < T > in Java API

Looking at the code of a set today, I found the difference in the use of generics, collection < E >, list < E >, and iterator < T >, so what is the difference between < E > and < T >?


Is the initial letter of element, which generally represents the elements in the collection.


Is the initial letter of type, indicating the type of transmission parameter.

The above discussion on the meaning of and in Java API is all the content shared by Xiaobian. I hope it can give you a reference and support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>