Posts

Showing posts from October, 2017

Lambda and Functional Interfaces

Image
Programming languages like C++ ,  javascript etc. are called functional programing languages because we can write functions and use them whenever needed. Being Object oriented is not bad but it adds verbosity . Functional Interfaces and Lambda Expression introduced in Java 8 can be used to write clean and crisp code, which is devoid of boiler-plate codes pieces. Brief Table of Content Introduction to Functional Interfaces Valid Functional Interfaces InValid Functional Interfaces Functinal Interfaces with Lambda Invalid Lambdas Variables in Lambda Lambda as Method Refrences Types of Method refrences Build-in Functional Interfaces Checking Functional Interface types Introduction to Functional Interfaces Functional Interfaces are interfaces with exactly one abstract method.They are basis for lambda expressions. Lambda expressions are piece of code that get pass around. Interface Mammals is a functional interface as it has single abstract method run(). An...