Java Course
Java 8 changed the way of writing the code i.e.. Functional Programming.
Functional programming is a way of organizing code that makes applications more scalable and maintainable. By utilizing the core concepts of immutability, data-function separation, and first-class functions, programmers can write better code.
Here with the Java 8 Features.
-
Lambda Expressions - a new language feature allowing us to treat actions as objects
-
Method reference - enable us to define Lambda Expressions by referring to methods directly using their names
-
Optional - special wrapper class used for expressing optionality
-
forEach - iterate collections
-
Function,Predicate, Supplier and Consumer Functional Interface - an interface which contains only one abstract method but can have multiple default and static methods is called Functional Interface.
-
Pipelines and Streams - Stream API is used to process a collection of objects.
-
Date and Time API - an improved, immutable JodaTime-inspired Date API
New date-time API is introduced in Java 8 to overcome the following drawbacks of old date-time API :
-
Not thread safe : Unlike old java.util.Date which is not thread safe the new date-time API is immutable and doesn't have setter methods.
-
Less operations : In old API there are only few date operations but the new API provides us with many date operations.
-
-
Default and static Methods in interface