NOT NULL Example :
"not null" means that the refernce is pointing to some object and stores "a memory address about how to get to the object in the memory"
Null Example :
a reference having a value null means that it doesn't point to any object.it is simply declaring a refernce variable
No, it isn't. A reference either points to an object or it points to null. It can't point to both simultaneously. Your == null test looks whether that reference points to an object or not (== null), and the if-then-else block uses that result to decide which option to take.
Premila Devi Dayalan wrote:But here,it is "pointing to some object as well"
Code tags for code, please Manish Singh, not quote tags.
Manish Singh wrote:Sure. Thanks for pointing