C.
code:
public static void main (String[] args) throws InterruptedException, ExecutionException {
List<String> li = Arrays.asList("pen", "a", "pencil");
Predicate<String> test = s -> {
int i = 0;
boolean result = s.contains("pen");
System.out.print(i++ + ":");
return result;
};
li.stream().filter(test).findFirst().ifPresent(System.out::println);
}
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
LocalHero
2 months agosteefaand
5 months agoduydn
9 months, 3 weeks agobalike
2 years agoWilsonKKerll
2 years, 3 months agoSvetleto13
3 years, 1 month agojduarte
3 years, 5 months ago