Domanda

Is the reason you can concatenate a primitive type to a String due to autoboxing?

È stato utile?

Soluzione

No.

The java language handles concatenation of primitives with Strings natively.

It was part of the language's first release - pre-dating autoboxing by about 10 years

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top