- Lambda Expressions, a new language feature, has been introduced in this release. They enable you to treat functionality as a method argument, or code as data. Lambda expressions let you express instances of single-method interfaces (referred to as functional interfaces) more compactly.
- Method references provide easy-to-read lambda expressions for methods that already have a name.
- Default methods enable new functionality to be added to the interfaces of libraries and ensure binary compatibility with code written for older versions of those interfaces.
- Repeating Annotations provide the ability to apply the same annotation type more than once to the same declaration or type use.
- Type Annotations provide the ability to apply an annotation anywhere a type is used, not just on a declaration. Used with a pluggable type system, this feature enables improved type checking of your code.
- Improved type inference.
- Method parameter reflection.
- Classes in the new
java.util.stream
package provide a Stream API to support functional-style operations on streams of elements. The Stream API is integrated into the Collections API, which enables bulk operations on collections, such as sequential or parallel map-reduce transformations. - Performance Improvement for HashMaps with Key Collisions
- Classes and interfaces have been added to the
java.util.concurrent
package. - Methods have been added to the
java.util.concurrent.ConcurrentHashMap
class to support aggregate operations based on the newly added streams facility and lambda expressions. - Classes have been added to the
java.util.concurrent.atomic
package to support scalable updatable variables. - Methods have been added to the
java.util.concurrent.ForkJoinPool
class to support a common pool. - The
java.util.concurrent.locks.StampedLock
class has been added to provide a capability-based lock with three modes for controlling read/write access.
- Parallel Array Sorting
- Standard Encoding and Decoding Base64
- Unsigned Arithmetic Support
To deeply study all enhancements
http://docs.oracle.com/javase/8/docs/technotes/guides/language/enhancements.html#javase8
http://docs.oracle.com/javase/8/docs/technotes/guides/language/enhancements.html#javase8
In Java 7
ReplyDeleteThe try-with-resources Statement - The try-with-resources statement is a try statement that declares one or more resources. A resource is an object that must be closed after the program is finished with it. The try-with-resources statement ensures that each resource is closed at the end of the statement. Any object that implements the new java.lang.AutoCloseable interface or the java.io.Closeable interface can be used as a resource. The classes java.io.InputStream, OutputStream, Reader, Writer, java.sql.Connection, Statement, and ResultSet have been retrofitted to implement the AutoCloseable interface and can all be used as resources in a try-with-resources statement.
Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking - A single catch block can handle more than one type of exception. In addition, the compiler performs more precise analysis of rethrown exceptions than earlier releases of Java SE. This enables you to specify more specific exception types in the throws clause of a method declaration.
Brilliant blog I visit this blog it's incredibly awesome. Curiously, in this blog content formed doubtlessly and sensible. The substance of information is helpful.
ReplyDeleteWorkday Online Training