What is the meaning of the <?> token in Java?

前端 未结 8 1809
囚心锁ツ
囚心锁ツ 2020-12-18 01:47

What is the meaning of the token in this code copied from www.JavaPractices.com? When I replace it with the more conventional looking

8条回答
  •  半阙折子戏
    2020-12-18 02:24

    It can take any parameter like Object,String,Integer.... and so on

    Now when you plan to use generics then you have to provide the type inside the angel bracket.

    EDIT:

    is strictly appliable to Collections. used as type or template for your normal class

提交回复
热议问题