In Java 8 following are the major enhancement.
- Lambda Expression
- Method Reference for Lambda Expression
- Java Streams
- Improved Interface
a) Now we can have concrete methods in an interface. It can be either static or default. Default methods can be overridden in implemented class. If a class implement two or more interface and there is a collision of default method then it is mandatory to override.
b) Functional interface. For lambda expression we can define an interface as function it will have only one abstract method.
Here is an good article explaining in details # https://www.journaldev.com/2752/java-8-interface-changes-static-method-default-method
- Enhancement to Annotation
More details # https://www.javatpoint.com/java-8-type-annotations-and-repeating-annotations
- Parallel Array Sorting
java.util.Arrays support sorting in parallel which will be faster.
- Hash Map performance improvement in case of Key collision
- Removed JDBC-ODBC bridge
More details on Java 8 features
http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html
- Lambda Expression
- Method Reference for Lambda Expression
- Java Streams
- Improved Interface
a) Now we can have concrete methods in an interface. It can be either static or default. Default methods can be overridden in implemented class. If a class implement two or more interface and there is a collision of default method then it is mandatory to override.
b) Functional interface. For lambda expression we can define an interface as function it will have only one abstract method.
Here is an good article explaining in details # https://www.journaldev.com/2752/java-8-interface-changes-static-method-default-method
- Enhancement to Annotation
More details # https://www.javatpoint.com/java-8-type-annotations-and-repeating-annotations
- Parallel Array Sorting
java.util.Arrays support sorting in parallel which will be faster.
- Hash Map performance improvement in case of Key collision
- Removed JDBC-ODBC bridge
More details on Java 8 features
http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html