Thursday, July 21, 2016

Java version history from 1.4 to 1.8




1) Java 4 Features :
The important feature of J2SE 4 is assertions. It is used for testing.


  • Assertion (Java 4)




2) Java 5 Features :
The important features of J2SE 5 are generics and assertions. Others are autoboxing, enum, var-args, static import, for-each loop (enhanced for loop etc.


  • For-each loop (Java 5)
  • Varargs (Java 5)
  • Static Import (Java 5)
  • Autoboxing and Unboxing (Java 5)
  • Enum (Java 5)
  • Covariant Return Type (Java 5)
  • Annotation (Java 5)
  • Generics (Java 5)








3) Java 6 Features :
A feature or an enhancement in Java is encapsulated in the form of a JSR. JSR, which stands for Java Specification Request is nothing but a formal proposal which details the need for a specific functionality to be available in the Java Platform that can be used by Applications. These JSR’s will be reviewed and released by a committee called JavaExpert Groups (JEG). This article covers the following list of features (or JSRs') that comes along with the Java 6 Platform.
Pluggable Annotation Processing API (JSR 269)


  • Common Annotations (JSR 250)
  • Java API for XML Based Web Services - 2.0 (JSR 224)
  • JAXB 2.0 (JSR 222)
  • Web Services Metadata (JSR 181)
  • Streaming API for XML (JSR 173)
  • XML Digital Signature (JSR 105)
  • Java Class File Specification Update (JSR 202)
  • Java Compiler API (JSR 199)
  • JDBC 4.0 (JSR 221)
  • Scripting in the Java Platform (JSR 223)




4) Java 7 Features :


The important features of JavaSE 7 are try with resource, catching multiple exceptions etc.


  • String in switch statement (Java 7)
  • Binary Literals (Java 7)
  • The try-with-resources (Java 7)
  • Catching Multiple Exceptions by single catch (Java 7)
  • Underscores in Numeric Literals (Java 7)




5) Java 8 New Features

There are several features added to Java 8, the most significant ones are mentioned below

  • Lambda expression − Adds functional processing capability to Java.
  • Method references − Referencing functions by their names instead of invoking them directly. Using functions as parameter.
  • Default method − Interface to have default method implementation.
  • New tools − New compiler tools and utilities are added like ‘jdeps’ to figure out dependencies.
  • Stream API − New stream API to facilitate pipeline processing.
  • Date Time API − Improved date time API.
  • Optional − Emphasis on best practices to handle null values properly.
  • Nashorn, JavaScript Engine − A Java-based engine to execute JavaScript code.

2 comments:

Distributed Transactions

What is a distributed transaction?  Transactions that span over multiple physical systems or computers over the network, are simply termed D...