Java – what is used by < > and what is its name?

I was working on some sample code, and then it came up:

public abstract class RandomPool<T> extends Pool {
     //Class...
}

What < > for? Why are these just t? It seems random to me But how do you use it from the perspective of a longer production program?

Thank you, tell me if I need to add more details!

Solution

See Java generics

T stands for "type"

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
分享
二维码
< <上一篇
下一篇>>