when we declare a string variable as
String s = null
then the string referrence variable s does not refer to any String object.
How does the statement s+=s
produce a value of nullnull??
does this mean that when s does not refer to any string object it gets a value of null. but still any other operations on the variable using the dot operator results in nullpointerexception.
String s = null
then the string referrence variable s does not refer to any String object.
How does the statement s+=s
produce a value of nullnull??
does this mean that when s does not refer to any string object it gets a value of null. but still any other operations on the variable using the dot operator results in nullpointerexception.