Friday, May 29, 2015

8 New Java 8 Features


1.Default and Static methods in    Interface
2.Lambda Expressions
3.Optional
4.Streams
5.Method References
6.Data Time API
7.Nashorn Javascript Engine
8.Parallel Arrays

1.Default and Static methods in Interface :
Java 8 introduces new features to interfaces.
Before java 8 interface having only abstract methods but now java 8 added two more type of methods to interface !.
First one is default method. A method which is having a default keyword with method body.
Actually interfaces wont have any implemented methods  but now with java 8 default method we can add a method with default implementation by using "default " keyword...
 

No comments:

Post a Comment