java - Is converting int to a String counted as Autoboxing? -


afaik when java automatically converts primitive type wrapper class object called autoboxing because primitive boxed wrapper class.

so is

int test = 3; string str = string.valueof(test); 

counted autoboxing?

reason ask?

i came across this question. reason think autoboxing introduced in java 5(not present in java 4).

no. autoboxing applies primitives -> wrappers. since there no string primitive (or wrapper), string has nothing autoboxing.


Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -