Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
A common programming need is for a static two argument equals method that does that right thing for nulls; that is, if both arguments are null it returns true, if one argument is null it returns false, and if both arguments are nonnull, it calls a.equals(b). This idiom is common enough that the platform should have a method to provide this functionality.
|