Question: Short Words Filter 1. Create an interface as follows. 2. public interface Filter { 3. boolean accept(Object x); 5. } 6. Implement a static method

Short Words Filter 1. Create an interface as follows. 2. public interface Filter { 3. boolean accept(Object x); 5. } 6. Implement a static method in the Filter Interface applyFilter. The method would take an ArrayList of type object objects and a Filter Instance, and would return all items in the objects array that are accepted by the supplied filter. NOTE how the method parameter and return types are object so it can accept any type. 7. static ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
