Single Abstract Method Interfaces serve as a fundamental building block for functional programming within Java 8. The design of Lambda expressions in Java 8 is fundamentally dependent on Single Abstract Method Interfaces. And as we all know, any Java interface can be classified as a Single Abstract Method Interface (or Functional Interface) as long as…
Tag: Java
Designing multitenant processing systems – Threads vs ThreadPools
Introduction It has happened to me so many times that I see Java code, written fairly recently, may be even a year or two years ago, and still uses the Java Thread class to build sufficiently complex multi-threaded systems, and obviously in a lot of such instances, it makes me think otherwise. One such interesting…
Benchmarking Approaches to Sort Java Map by Value
As the name suggests, this blog tries to explore a few ways one could use to sort a Java Map by values it contains and present a quick comparison of these approaches. Alright, first things first, sorting a Map by Value is not supported directly through a JDK API, at least until Java 8, so one needs to…