Given:
and the code fragment:
Which modification enables the code fragment to print Speaker?
A. Implement Predicate in the Product.ProductFilter class and replace line n2 with .filter (p -> p.ProductFilter.test (p))
B. Replace line n1 with: public static booleanisAvailable (Product p) {
C. Replace line n2 with:
.filter (p -> p.ProductFilter: :isAvailable (p))
D. Replace line n2 with:
.filter (p -> Product: :ProductFilter: :isAvailable ())
why b??
B
Answer is B.