Lambdas vs Anonymous Classes

So far in java we have seen interfaces and abstract classes, with a single abstract method, being used as function types. Their instances, known as function objects, represent functions or actions. Since JDK 1.1, the primary means of creating a function object was the anonymous class. Below is a code snippet to sort a list of strings in order … More Lambdas vs Anonymous Classes