Interfaces went through major changes while redesign in Java 8 and as a part of that Java 8 default methods in Interface are the major addition. Java 8 interfaces also supports static methods along with default and abstract methods. Let’s dig into the more details to know the facts about default methods in interfaces.
Whenever we hear about Java 8 Streams the first thing which strike in mind would be Java I/O stream and classes like
OutputStream. But here in Java 8 Stream is quite different concept than Java I/O Streams. Java 8 Stream best implementation of functional programming which can be used easily with Java Collection Framework.
Java 8 Functional Interface concept was introduced by Java to support Lambda Expressions which are very similar to Scala with the fact that you can assign Lambda Expression to a Functional Interface. Let’s explore the details.
Many of us are very curious about the fact that why functional references introduced in Java 8 are know as Lambda Expressions. So let’s reveal the fact of word “Lambda Expressions” and make it very simple to understand.
This fact is very much related to the Evaluation process of any expression. Many of us may have solved the mathematical problems and while solving the problems we may have observed how we are reducing the mathematical expression to some values. Similarly we also may have observed in many programming languages how any expression is evaluated.