+ 9
What is the difference between NULL and zero ??
Problem 236+java
6 odpowiedzi
+ 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