What is the difference between null
, 0
and nothing
?
I cannot find a question addressing all three of these.
For example:
If I am getting input from a string
and parsing it to int
.
return Integer.parseInt(sc.nextLine());
Or if I am asking if a string != ""
, or a is not nothing
I am confused about which to use when and why.
I am confused about which one to use when validating data.