0 votes
in JAVA by

Which of the following is a valid use of lambda expressions?

       A. public void execute(Runnable r){ r.run(); } Execute(() -> {});

       B. Predicate p = (Apple a) -> a.getWeight(); public interface Predicate { boolean predicate(T t); }

       C. public Callable fetch() { Return ? “Tricky example ;-)”; }

       D. All the options

1 Answer

0 votes
by

Correct answer is public void execute(Runnable r){ r.run(); } Execute(() -> {});

...