Lambda expression in Java

Well Lambda expression is very easy concept in java.

If you see languages like python, jython and Java script they have concise code example
X=10 is valid in JavaScript 

But in Java u need to define return type, modifiers datatype etc
So to bring consice programming in Java lambda expression came.

Another popular word for this is functional programming

This concept came in 2013-14 in Java bcoz other languages have this concept where u have to write less code inorder. To compete Java requires this functional programming.

Practise Programmes of Lambda Expression


For understanding lambda expression remember one name RAM.


Ram is No Return type , Anonymous ,  No Modifiers 


Lets write this code in Lambda

public class Add{
   
    public  int add(int a,int b){
       
        return a+b;
       
    }
     public static void main(String []args){
       
        Add a=new Add();
       
        System.out.println(a.add(4,5));
     }
}






















Comments

Popular posts from this blog

Integration Control

Zensar Java interview questions