A Admin • 832.27K Points Coach Q. Which method will throw if there is no element in the stream? (A) findFirst().orElse(null) (B) findFirst().get() (C) findAny().isPresent() (D) findFirst().orElseThrow() Correct Answer - Option(B) Views: 16 Filed under category Java Hashtags: Java Streams Share Manage Tags
Discusssion
Login to discuss.