Use Lambdas Instead of Anonymous Classes In Java
December 23, 2020
Another useful feature introduced since Java 8 is the possibility to use lambdas instead of anonymous classes. Here is an example: Imagine you have the following list of names: If you want to sort it alphabetically ignoring the case, you would have to use a Comparator and implement its compare method in an anonymous class… read more »