DEV Community

Discussion on: Let's revisit Java in 2019

Collapse
 
mustabelmo profile image
Mustapha Belmokhtar

thanks @sumit for the article.
In this example

Stream<String> stream = Stream.of("sam", "sumit", "jhon","nancy");
List<String> list = stream.dropWhile(name -> (name.charAt(0) == 'a'))
              .collect(Collectors.toList());

The drop-while conditon is name.charAt(0) == 's'.

Regards

Collapse
 
tech_sam profile image
Sumit

@mustapha , thanks for your valuable time to read and pointing out the mistake, fixed it :)