Salesforce coding lessons for the 99%
Finally, Apex tutorials for point-and-click admins! Written by a self-taught Google engineer.
  • Beginner Tutorials
    • Apex
    • Certifications
    • Career Info
    • Technical Architect
    • Visualforce
    • Videos
  • Apex Academy
  • Success Stories
  • About Me
  • Misc
    • Mailbag
    • Challenges
    • Links
    • Login to my Org
Follow @dvdkliuor SUBSCRIBE!

What’s the difference between Zero and Null?

March 2, 2019

A picture is worth a thousand words!

Both have struck fear into my heart – in the restroom and in my code!

Enjoy life!
David

10 Comments
Sireesha
May 7, 2019 @ 1:43 am

Great post..especially the Purpose has much profound influence on our success than the goal ..Thanks David , for the awesome post..

Reply
Vandy S.
April 9, 2019 @ 11:56 pm

I feel some questions do not deserve answers, they are good as questions only and this one from you… such a thought-provoking one!

Great start of the day for me, indeed a good one David :)

Reply
Cesar Ribeiro
March 12, 2019 @ 7:25 pm

In programming some languages make null the same as zero (C++) but some don’t (Java). In databases a record might have a null value in one field or it might have a zero and these are not the same. Zero is can be used to indicate a counted quantity whereas null cannot.

Reply
Sy Tee
March 4, 2019 @ 10:51 am

Null is the value given at instatiation before initialization and will result in Nullpointer error if used. Zero is a value. That’s for variables.

Reply
Jackie
March 4, 2019 @ 9:23 am

That is a thought-provoking visual!

In the world of Seinfeld, it’s the same… you “don’t have a square to spare”.

Thanks for the laugh!

Reply
Anonymous
March 4, 2019 @ 5:03 am

I always thought the question was…What’s the difference between blank (“”) and null.

Reply
Robi
March 4, 2019 @ 3:40 am

I love the sticking metaphore. One understands it for a lifetime. :)

Reply
Justice Sikakane, Sr.
March 4, 2019 @ 12:41 am

A value vs. “”

Reply
Kathy Z
March 3, 2019 @ 12:29 pm

Appreciated this SMILE

Reply
Stephen
March 3, 2019 @ 5:43 am

“Null” is blank, Zero has one digit “0”

Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


*

*

Theme: Simple Style by Fimply