Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 319237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:38:35+00:00 2026-05-12T08:38:35+00:00

(I know what null is and what its is used for) Question: OK, say

  • 0

(I know what null is and what its is used for)

Question: OK, say we make a reference to an object in whatever language. The computer makes a little 32-bit (or other size, depending on computer’s design) space in memory for that reference. That memory can be assigned to a value that represents an object’s location in memory. But when I set the reference to null, what value does it really have? (what are the individual bits in the reference set to) Are the bits just zeroed out? But wouldn’t that also be a location in memory? How does the computer tell that the reference contains null instead of a reference to an object?

I know this isn’t an “important” question, but I’m curious as to how it works.

Thanks guys 😀

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:38:35+00:00Added an answer on May 12, 2026 at 8:38 am

    There are two halves to the answer:

    • the value is zero (ie. all bits in the value are zero)
    • zero is never considered a valid address.

    The second point is why the answer to your question “But wouldn’t that also be a location in memory?” is “No” – it’s simply a rule that zero is not considered a valid memory location. Attempting to access it will cause an exception.

    Edit: According to Wikipedia (so it must be true 😎 “some architectures use a signed address space and use the most negative value”. So it’s not necessarily zero on all architectures, but whatever value it has on a given architecture, that value is considered an invalid memory location.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I can find out if a variable is null in Java using
I know how to check if a parameter is null but i am not
Anyone know the syntax for writing a php-mongo query to use NOT NULL ?
I know that in Chrome and FF, if window.onbeforeunload returns null, then the dialog
So I know in ruby that x.nil? will test if x is null. What
Why Java decided to allow 'null' as a key in HashMap? As we know
I know what I asking might not make a lot of sense for C#
Okay, this is (probably) a very simple question, but I am afraid I know
C++ requires all types to be defined before they can be used, which makes
probably a very beginner's question, but I'm really interested in how to make it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.