0
Is null and 0 equal in java??
8 Answers
+ 8
@Alexey congrats for your epic badge
+ 6
no, zero is not null.
+ 6
"0" is zero
"null" is a special value
For object type null is an empty reference.
+ 6
Both are different, null means that a reference that points nowhere. 0 is a numeric value
+ 1
null is nothing, no value. Zero is a value even if its zero.
+ 1
so they both were different...
0
no both are different.