I like to know why do we call null string. Where Strings are objects in java and objects can not be null only references can be null.
Can anybody elaborate on it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s a bit of confusion here. I would expect ‘null String’ to be a String reference that doesn’t actually reference a String (i.e. it’s null). But this article claims a ‘null string’ to be an empty string.
For this reason, I try to talk about null references – i.e. references that point to nothing at all, rather than a valid object. And (to be clear) empty Strings. A ‘null String’ to me means the same as a null reference, but the latter term is clearer to me.