0 is a number, you use it to check if the numeric value (int, short, float, double, etc.) is the number 0.
null is the value of a link that is not specified anywhere, you use it to make sure that the link is really referring to something.
nothing not part of Java.
The closest thing for nothing (for: no information whatsoever) is the declaration of the void method. He claims that the method returns literally nothing.
Note that 0, null and the empty string "" are values ββand therefore contain information.
For example, 0 is the answer to "What is subtracted 5 from 5?" (among others).
null is a negative response to "Does this thing point to an object?".
"" "may be the answer to the question:" What is the longest sequence βX in your name?β if your name is not βXanthippeβ.
Ingo
source share