Features of Java 5
For-each loop
Varargs
Static Import
Autoboxing and Unboxing
Enum
Covariant Return Type
Annotation
Generics
Features of Java 6
Pluggable Annotation Processing API
Common Annotations
Java API for XML Based Web Services – 2.0
JAXB 2.0
Web Services Metadata
Streaming API for XML
XML Digital Signature
Java Class File Specification Update
Java Compiler API
JDBC 4.0
Scripting in the Java Platform
Features of Java 7 (55 New Features)
String in switch statement
Binary Literals
The try-with-resources
Caching Multiple Exceptions by single catch
Underscores in Numeric Literals
Diamond Operator
Fork and Join
New File System API (NIO 2.0)
Concurrency Utilities
Features of Java 8
List primeNumbers = ReferenceToStaticMethod.testPredicate(numbers, a -> ReferenceToStaticMethod.isPrime(a));
List primeNumbers = ReferenceToStaticMethod.testPredicate(numbers, ReferenceToStaticMethod::isPrime);
For-each loop
Varargs
Static Import
Autoboxing and Unboxing
Enum
Covariant Return Type
Annotation
Generics
Features of Java 6
Pluggable Annotation Processing API
Common Annotations
Java API for XML Based Web Services – 2.0
JAXB 2.0
Web Services Metadata
Streaming API for XML
XML Digital Signature
Java Class File Specification Update
Java Compiler API
JDBC 4.0
Scripting in the Java Platform
Features of Java 7 (55 New Features)
String in switch statement
Binary Literals
The try-with-resources
Caching Multiple Exceptions by single catch
Underscores in Numeric Literals
Diamond Operator
Fork and Join
New File System API (NIO 2.0)
Concurrency Utilities
Features of Java 8
- Lambda expression − Adds functional processing capability to Java.
List primeNumbers = ReferenceToStaticMethod.testPredicate(numbers, a -> ReferenceToStaticMethod.isPrime(a));
- Method references − Referencing functions by their names instead of invoking them directly. Using functions as parameter.
List primeNumbers = ReferenceToStaticMethod.testPredicate(numbers, ReferenceToStaticMethod::isPrime);
- Default method − Interface to have default method implementation.
- New tools − New compiler tools and utilities are added like ‘jdeps’ to figure out dependencies.
- Stream API − New stream API to facilitate pipeline processing.
- Date Time API − Improved date time API.
- Optional − Emphasis on best practices to handle null values properly.
- Nashorn, JavaScript Engine − A Java-based engine to execute JavaScript code.
No comments:
Post a Comment