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

后端 未结 7 800
闹比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:09

    These are called Generics. Here http://java.sun.com/docs/books/tutorial/java/generics/index.html is a tut from sun for them.

提交回复
热议问题