Missing Values
A Programming Pattern |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
double
values and
a sentinel like -1
for missing valuesnull
can be used as a sentinel for all
reference typesDouble
or Integer
)valueOf()
method to construct the
wrapper object, otherwise leave it null
null
doubleValue()
or intValue()
method to retrieve the value