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