What does it mean to say a type is “boxed”?

后端 未结 6 1378
刺人心
刺人心 2020-12-11 00:15

I have heard of types being referred to as \"boxed\" in some languages.

In Java, I have heard of \"autoboxing\". What is this? Is it having wrapper classes for a ty

6条回答
  •  攒了一身酷
    2020-12-11 00:44

    Boxed means that they took a regular value type and created an object around it. Sort of like putting it in a box. This is generally to be avoided, because of the overhead of constructing the object.

提交回复
热议问题