Type erasure not working in Java Map class

前端 未结 2 1462
别那么骄傲
别那么骄傲 2021-01-03 05:22

I decompiled the Map class using javap. The class definition still shows the presence of generic types K and V. This should have been erased by the concept of type erasure.

2条回答
  •  一生所求
    2021-01-03 05:58

    There is extra information inside the bytecode that is used decode the generic information.

提交回复
热议问题