What code does the compiler generate for autoboxing?

后端 未结 4 1456
梦如初夏
梦如初夏 2020-11-27 20:37

When the Java compiler autoboxes a primitive to the wrapper class, what code does it generate behind the scenes? I imagine it calls:

  • The valueOf() method on t
4条回答
  •  猫巷女王i
    2020-11-27 21:19

    I'd recommend getting something like jad and decompiling code a lot. You can learn quite a bit about what java's actually doing.

提交回复
热议问题