Sup Java .com _hot_ May 2026

// Filter and collect names longer than 3 chars List<String> longNames = names.stream() .filter(name -> name.length() > 3) .collect(Collectors.toList()); System.out.println(longNames); // [Alice, Charlie]

Leave a Reply

Your email address will not be published. Required fields are marked *