Multiple ChoiceBeginner 45s
Null Object vs Optional
What is the main benefit of the Null Object pattern over returning null?
Options
- 1It improves the performance of object creation by reusing shared instances
- 2It allows shared state across threads without any explicit synchronization
- 3It eliminates all null-related errors by providing a do-nothing neutral implementation
- 4It removes the need for interfaces by letting callers check the object type
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.