Given:
and the code fragment:
Which modification enables the code fragment to print Speaker?
Implement Predicate in the Product.ProductFilter class and replace line n2 with .filter (p -> p.ProductFilter.test (p))
Replace line n1 with:public static boolean isAvailable (Product p) {
Replace line n2 with:.filter (p -> p.ProductFilter: :isAvailable (p))
Replace line n2 with:.filter (p -> Product: :ProductFilter: :isAvailable ())
Submit