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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With