In Java, what does it mean when a type is followed by angle brackets (as in List)?

后端 未结 7 765
闹比i
闹比i 2020-12-21 02:34

I saw sometimes a type object inside <> beside of another object type declaration. For instance:

NavigableMap colorMap = new Tree         


        
相关标签:
7条回答
  • 2020-12-21 03:17

    They're known as generics in java, and templates in C++.

    http://java.sun.com/developer/technicalArticles/J2SE/generics/

    0 讨论(0)
提交回复
热议问题