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