I know what null
is.
I know null
means to "cancel out" make it zero, nothing, absolutely blank.
But if null is a variable, what is it's value? It has to have an initialised value, correct?
I know what null
is.
I know null
means to "cancel out" make it zero, nothing, absolutely blank.
But if null is a variable, what is it's value? It has to have an initialised value, correct?
But if null is a variable, what is it's value?
null cannot be a variable, but rather it is the value held by a reference variable that refers to nothing.
It has to have an initialised value, correct?
Per the JVM, it is the initialized value of any non-initialized reference field.
Better answer to be found here. Closing question as a duplicate.