Java 8: Release and Features

  • 0
Java 8

Java 8: Release and Features

Tags : 

Finally, Java 8 arrives on March 18, 2014. This release has been announced at EclipseCon 2014. It is the first major release in Java after two years of time. Java 8 comes with lot of new features which are new to the Java programming itself. From today you can download Java 8 and use it in your project. We already predicted the Java 8 release in our previous blog: JAVA: STORIES 2013

Some of the notable improvements and features in Java 8 are listed below:

Lambdas Expressions

Provide a means to pass functions as data. With implicit casting to Single Abstract Method types (such as Runnable) it will dramatically simplify code that needs to pass filters and other predicates as data. (Note that the reason they are called lambdas is that Java has had closures in the form of inner classes since Java 1.1; what some incorrectly refer to as closures are really talking lambdas.) An example of a lambda is x -> x +1.

Stream API

Classes in the new 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.

Extension Methods or Defender Methods

We all are aware of the fact that the interfaces don’t contain any implementation for the methods. To provide support for new APIs which support the use of closures and also which can run on Multi core platforms there has to be some way to add these APIs to existing classes. For example, methods like for Each, map, reduce, filter which act on a collection can be added to the Collection class directly or create a new interface and let all the collection API implement them or leave it to the user of the API to implement the new interface. The first 2 approaches would lead to breaking lots of existing code because of the lack of implementation of these new methods in the interface. The last approach is possible, but it doesn’t enhance the collection API out of the box.

The team which handles JSR-335 thought of a way to add default implementation to the interfaces, which gives an option for the implementor to override the method or to leave it as is. This way new APIs can be added to the Collection class without breaking the existing code and yet provide the full support of the closures to the existing code.

JSR 310

This section adds new Date and Time API to Java for avoiding any problems arise out of the existing java.util.Data classes.

Method References

Method references provide easy-to-read lambda expressions for methods that already have a name.

Other Changes

  • Removal of PermGen
  • JDK 8 includes Java Mission Control 5.3
  • Default Methods in the Java Programming Language are supported by the byte code instructions for method invocation.
  • Classes and interfaces have been added to the java.util.concurrent package.
  • JDBC 4.2 introduces new features.
  • Nashorn Javascript Engine
  • Repeating Annotations provide the ability to apply the same annotation type more than once to the same declaration or type use.

Apart from the above changes, there are ton of new features and changes introduced as part of the Java 8 release.

You can follow @S_Analysts on Twitter or join our Facebook fan page to stay updated on the latest techno news or blogs.

  • 0

Java: Stories 2013

Tags : 

2013 was a year of Java releases. The JavaOne 2013 opening video is available on YouTube/Java channel now. It is a great story of how Java is improving our lives, and how the world is getting connected. Following are some of the top stories of Java in the year of 2013:

Release of Java EE 7

Java Platform, Enterprise Edition 7 (Java EE 7) offers new features that enhance HTML5 support, increase developer productivity, and further improves how enterprise demands can be met. Java EE 7 developers will write less boilerplate code, have better support for the latest Web applications and frameworks, and gain access to enhanced scalability and richer, simpler functionality. Enterprises will benefit from new features that enable portable batch processing and improved scalability.

JavaFX is Open Source

In January, first code drop of JavaFX 2.0 source code was made public on OpenJFX. Everybody is welcome to contribute to this project, port it to other platforms or devices, or do anything else that a free software license allows you to do!

Java and the Internet of Things

Everyone was waking up to the Internet of Things (IoT) in 2013. The Java language and platform were ready for this new wave. Oracle delivers a comprehensive platform for the entire IoT architecture across all vertical markets. From the Java platform to embedded data-management systems; from back-end databases, big data technologies, middleware, and integration and analytics technologies to extreme performance hardware that turns data into insight, Oracle is the only company that delivers an integrated, reliable, and secure platform to meet your IoT program needs today and into the future.

Java SE Update Releases

Oracle focused and addressed several security issues with Java SE Updates throughout the year: Java SE 7 Update 11 and Java 7 Update 25. Java SE 7 Update 21 introduced new security features, including a Server Java Runtime Environment (Server JRE). Java SE 7 Update 40 included Java Mission Control, set of tools to monitor, manage, profile, and eliminate memory leaks in your Java applications.

Oracle Ends Commercial Support of GlassFish

Oracle announced it will no longer release future major releases of Oracle GlassFish Server with commercial support.

Java attacks reach critical mass

This was a rough year for Java in the browser. Major new vulnerabilities repeatedly battered Java browser plugins, encouraging many organizations to get rid of Java in the browser if possible. But the good thing is, as Oracle had promised, it released an out-of-band fix more rapidly than some observers had expected.

Java SE 8 

Java 8 is expected in March 2014, and will include features that were planned for Java 7 but later deferred. Java SE 8 is well underway, and early access builds are available. Lambdas are a key feature.

Stay tuned for much more about this release in 2014.