Saturday, 24 August 2013

Project Lambda

Lambda is one of the exclusive feature that java 8 is expected to show cast . Lambda expression makes the code readable with fewer lines in the program . " -> "  operator is being introduced in java 8 which can be used in anonymous classes as follows
Without Lambda
Runnable runnable1 = new Runnable() {
@Override
public void run() {
System.out.println("Running without Lambda");
}
};
New way with Lambda
Runnable runnable2 = () -> { System.out.println("Running from Lambda"); };
Developers are ready to wait and support the delay in release of Version 8 as the community is facing some security issues and is expected to be fixed as early as possible. Lets Hope for the new look of Java 8.


No comments:

Post a Comment