A Admin • 825.56K Points Coach Q. How can you avoid a `NullPointerException` while using streams? (A) Use empty lists only (B) Use null-safe streams like `Optional.ofNullable()` (C) Avoid using `stream()` (D) Convert everything to primitive types Correct Answer - Option(B) Views: 7 Filed under category Java Hashtags: Java Streams Share Manage Tags
Discusssion
Login to discuss.