What's this generics usage in Java? X.method()

前端 未结 5 660
野性不改
野性不改 2021-02-07 06:22

I\'ve read the whole SCJP6 book Sierra and Bates book, scored 88% the exam.

But still, i never heard of how this kind of code works as it\'s not explained in the generic

5条回答
  •  余生分开走
    2021-02-07 06:29

    In this case it is a way of telling the reverseOrder method what kind of ordering should be imposed on the object, based on what type you specify. The comparator needs to get specific information about how to order things.

提交回复
热议问题