Java SE 8 introduces significant enhancements to the Java language and class libraries. These enhancements enable you to make code more concise without losing readability; write more reliable code; better utilize multi-core and multi-processor systems (code is no longer inherently serial or parallel); and detect more errors at compile time, rather than at run time.
See What's New in JDK 8 and JDK 8 Adoption Guide for more detailed information on these new features and how to adopt them.
Learn more about these features with the following links from Java SE 8 Technical Documentation:
- Java Language Enhancements
- Lambda Expressions enable you to treat functionality as a method argument, or code as data. They are similar to closures and provide more concise anonymous function types and a more functional style of programming.
- Default Methods (or Extension Methods) provide a mechanism to add new methods to existing interfaces.
- Type Annotations provide the ability to apply an annotation anywhere a type is used, not just on a declaration.
- Improved Type Inference enables the Java compiler to takes advantage of target typing to infer the type parameters of a generic method invocation. The target type of an expression is the data type that the Java compiler expects depending on where the expression appears.
- Obtaining Names of Method Parameters shows you how to retrieve parameter names of methods and constructors (not just types and return types) by reflection.
- Core Libraries Enhancements
- Java Virtual Machine Enhancements
java command lists deprecated and removed options as a result of the retirement of rarely used garbage collection combinations and the removal of permanent generation
Simon Ritter has presented the screencast New Features in Java SE 8: A Developer's Guide during the Java 8 Launch Webcast, which discusses these features.
Download JDK 8 today and try it out!