• Post Reply Bookmark Topic Watch Topic
  • New Topic

if(null == null) How does this return true ?  RSS feed

 
Faisal syed
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thinking of null as an unknown value, that cannot be resolved, how come one unknown can be equal to another unknown?
 
Stephan van Hulst
Saloon Keeper
Posts: 7993
143
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because thinking of null as an unknown value is wrong. Null does not mean "unknown", it means "nothing".

Nothing equals nothing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!