how can you emulate functional programming in java, specifically, doing things like map a function to a collection of items?
map(func, new String[]{\"a\",\"
Just wrap the function you want to apply on the list with a class or an interface.
public interface Func { Object f(Object input); } public void map (Func func, Object[] arr) { for(int i=0;i