The Stream in Java 8
When I first heard about the Stream API, I was confused about the name since it sounds similar to InputStream and OutputStream from Java I/O. But Java 8 streams are a completely different thing. Streams are playing a big part in functional programming to Java.
The Lambda in Java 8
Now We know something about Default Methods for Interfaces from my last blog.
Java 8 enables us to add non-abstract method implementations to interfaces by beginning with the default keyword. This feature is also known as Extension Methods. Here is our first example:
The evolution of Interface in Java 8
Designing interfaces have always been a tough job because if we want to add additional methods in the interfaces, it will require change in all the implementing classes.