There is the following List<String> :
List<String> arrList = Arrays.asList("небо", "земля", "облако", "космос", "звезда", "галактика"); Having created a stream , we filter the elements (words) with a length of less than 6 characters, for example, and count the number of these elements.
long count = arrList.stream().filter(w -> w.length() > 6).count(); In what order are the filter() and count() operations actually performed? In the same in which they follow in this expression?