Autoboxing: So I can write: Integer i = 0; instead of: Integer i = new Integer(0);

后端 未结 9 1263
猫巷女王i
猫巷女王i 2020-12-01 21:04

Autoboxing seems to come down to the fact that I can write:

Integer i = 0; 

instead of:

Integer i = new Integer(0);
         


        
9条回答
  •  感动是毒
    2020-12-01 21:48

    With my cynical hat on: to make-up for limitations on the original Java (I mean Oak here) spec. Not just the first time.

提交回复
热议问题