Which equivalent code can replace i -> i != 0 in the following line?
Predicate<Integer> ip = i -> i != 0;
Click to view the answer
D.
When you're using brackets, both the return keyword and semicolon are needed for the lambda to compile, making Option D correct.