Why define object for getEntry in HashMap

后端 未结 4 952
盖世英雄少女心
盖世英雄少女心 2020-12-21 20:56

I am new to generics and I am not sure if the answer to my question is opinion based or has a genuine reason. In the following code what was need to case a key

4条回答
  •  我在风中等你
    2020-12-21 21:37

    If what you want to do with a class requires you jump through hoops, you do. With generics I have had trouble getting it to make sense all the time. sometimes it turns out easier than you would think, other times you try everything you can think of. keep at it.

提交回复
热议问题