+ 9
What is the difference between NULL and zero ??
Problem 236+java
6 RĂ©ponses
+ 19
When an object reference variable is not initialized the variable is not pointing to an object. It is NULL.
When an primitive numeric variable is not initialized its default value is zero.
+ 9
Zero is a value.
NULL means an absent value.
+ 4
Zero is a defined int with value 0
NULL is a undefined variable contains no value.
+ 4
NULL means UNDEFINED (dividing a/0 will give undefined)
ZERO is an integer which means the number 0
+ 3
NULL means no value as in "unassigned".Â
An object that is not instantiated should be NULL.Â
But in databases NULL means unassigned = no valueÂ
It is different from 0 which is a value that can be count
+ 3
Just like the difference between white and transparent.
White is no color.
Transparent is colorless.