I believe most of the Java Developers are aware of the latest Java release i.e Java 7. Lot of us are disappointed about quite a few important features being deferred to Java 8, but its really good to see the language evolving and lot of things happening in the Java community. You must have seen plethora of articles on try-with-resources, strings in switch statements and other minor language enhancements as part of Project Coin. These are just few of the enhancements added to the release. There are few other API enhancements which are good to know, for example new Files API in java.nio package, watching directory changes, Fork-Join framework.

I went through few of those topics and blogged about them and I thought it is best to aggregate them here for the benefit of the readers.

Fork-Join Framework:

In Java 5 java.util.concurrent package was added with lot of new classes for developing concurrent applications- Executor, ExecutorService, Callable, Futures among others. Fork-Join framework was added in Java 7 which builds on top of ExecutorService and adds task stealing algorithm in which the tasks queued in one thread can be picked by ideal threads and this facilitates creating multiple tasks and not worrying about tasks not getting executed.

  • A brief overview of Fork-Join framework can be found here.
  • Implementing mergesort algorithm using ForkJoin framework can be found here.

Enhancements to the File API:

A new package java.nio.file was added with support for representing file path, a static Files utility for reading, writing to a file and other file related tasks, working with symbolic links, api for implementing watch service and others.

There was another utility added to java.util package- Objects class with static utility methods for operating on object references. This is kind of unknown addition but has been used extensively in the Java 8 APIs. And I came across this while reading through the Java 8 code.

One other important feature added to the JVM- invokedynamic has been missed out here. And I think its quite important to explore this feature for there are languages like Groovy 2.0, JRuby making use of this feature.

Tagged with:
 
About The Author

Mohamed Sanaulla

4 Responses to Various API and language enhancements as part of Java 7

  1. ayisha says:

    Thanks allot

  2. JavaPins says:

    Various API and language enhancements as part of Java 7 | Experiences Unlimited…

    Thank you for submitting this cool story – Trackback from JavaPins…

  3. shipra says:

    Hello, sir i would like to ask that what is the scope of java training, what all topics should be covered and it is kinda bothering me … and has anyone studies from this course http://www.wiziq.com/course/1779-core-and-advance-java-concepts of core and advance java online ?? or tell me any other guidance…
    would really appreciate help… and Also i would like to thank for all the information you are providing on java concepts.

    • For learning java I started with Head First Java and then followed it with Core Java Vol-1 and Vol-2 by Cay Horstmann. I havent used any of the online training and not heard about the training you have posted.
      Anyways there’s no such differentiation as Core Java and Advanced Java. Generally training institutes or the material is divided such a way that the reader can learn the basic concepts and then start applying them to advanced features like JDBC, Concurrency and so on.

      So to answer your query- I would say pick a book and then try to code in Java and practice. Also do visit- http://www.coderanch.com if you have any queries. There are lot of experts who would be willing to help you out with your queries.

Leave a Reply