About Question enthuware.ocajp.i.v8.2.924 :
Posted: Tue Feb 07, 2017 12:59 pm
Hi Paul,
I had some some research on this but I could not determine if a string literal (i.e. without the part can be autoboxed into a "String" object.
I thought this was the case, but whenever a literal is created, it is created from the string pool. If this is the case, then was indeed a string literal "autoboxed" into a String object (and then widened to type Object)?
Let me know if my question does not make sense, thank you!
Sincerely,
James
I had some some research on this but I could not determine if a string literal (i.e. without the
Code: Select all
new String("hello")
I thought this was the case, but whenever a literal is created, it is created from the string pool. If this is the case, then was indeed a string literal "autoboxed" into a String object (and then widened to type Object)?
Let me know if my question does not make sense, thank you!
Sincerely,
James