Learn More About New Features in Java SE 8
By Raymond Gallardo-Oracle on Mar 25, 2014
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.
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
- New and Enhanced APIs That Take Advantage of Lambda Expressions and Streams in Java SE 8 modernizes and potentially improves the performance of general library APIs. They also demonstrate bast practices for default methods.
- Concurrency Utilities Enhancements include scalable update variables,
- Aggregate Operations are a significant change to the Collection APIs. They provide a more sophisticated and flexible way to iterate through a collection. These operations feature serial and parallel implementations, and can be linked together to form a pipeline of operations.
- Arrays and Fork/Join describe parallel array sorting through the use of the
parallelSortmethod in the
- Date-Time APIs includes support for partial dates, durations, periods, intervals, and more complex calendaring systems.
- Enhancements in Packages java.lang.* and java.util.* describes a new, standard API for base64 encoding and decoding; the
Base64class defines factory methods to get
Decoderinstances that encode and decode base64 data
- Compact Profiles are essentially subsets of the standard class libraries. You can compile your applications with one of these compact profiles, thereby decreasing the size of your application.
- Java Virtual Machine Enhancements
Download JDK 8 today and try it out!