InterviewSolution
Saved Bookmarks
| 1. |
Explain The Use Of Ofnullable Method In Stream? |
|
Answer» ofNullable method is introduced to prevent NullPointerExceptions and to avoid null checks for streams. This method RETURNS a SEQUENTIAL STREAM containing SINGLE element, if non-null, otherwise returns an EMPTY Stream. ofNullable method is introduced to prevent NullPointerExceptions and to avoid null checks for streams. This method returns a sequential Stream containing single element, if non-null, otherwise returns an empty Stream. |
|