What does the in java mean?

后端 未结 4 1988
野的像风
野的像风 2020-12-11 04:39

I have seen declarations, interfaces and classes that go TYPE

What does this do/mean?

4条回答
  •  北荒
    北荒 (楼主)
    2020-12-11 05:13

    public class Grid {
    

    That's how you define a generic class in Java.Grid is the class and E is a formal type parameter.

    If you are really interested in learning about it, you will find a very good reference here - Java Generics FAQs - Frequently Asked Questions

提交回复
热议问题