java - how does "null" works ? is its value a constant? -
this question has answer here:
- what null in java? 14 answers
can tell binary value null? know jvm dependent can tell me how works ? how jvm allocate address null? stays constant throughout until system restarts?
'null' in java or in programming language empty initialization don't have nulls consume memory space.it refer variable value pointing null value created in memory.
for example:
string nullstring = null ; declares 16 byte memory point null value.
even though u mean null memory used reference variable in case nullstring later.
**let wanna
string nullstring = "10"; //still time consumes same bytes because declared value pointer changed time!**
to honest handling null , jvm or c driven jvm thing or c no wonder.because , driven form c except java added own high level abstraction manage thing memory! null pointer in c , java manager on later! adios!
Comments
Post a Comment