Difference Between Java 5 and Java 6


Main Difference

Java 6 is the present stable variant of Java programming dialect, while Java 5 is its past adaptation. Java 5 is authoritatively taken a break and is not bolstered by Sun any longer. Despite the fact that Java 5 included numerous significant changes (like Autoboxing) to the dialect, Java 6 includes assisting more helpful components. In particular, Unlike with Java 5, which concentrated on including/enhancing dialect (grammar) highlights, Java 6 added a wide scope of upgrades to the foundation of the Java dialect. In spite of the fact that, Java 5 presented Annotations, Java 6 concocted extra sorts of comments and APIs for handling explanations (e.g. Web administrations metadata for the Java Platform, Common Annotations for Java Platform, in addition to the Pluggable Annotation Processing API). On account of the new compiler API included with Java 6, the java compiler can now get and/or send yield to a reflection of the document framework (projects can indicate/process compiler yield). Moreover, Java 6 added upgrades to the applications GUI capacities in AWT (quicker sprinkle screens and backing for framework plate) and SWING (better movable, support for tweaking formats, multithreading improvements, and capacity to compose GIF pictures). Moreover, changes have been added to the detail of the class document including a system to permit projects to associate with scripting translators and in reverse route to gathering classes.


Java 5

Java 5 (otherwise called Java Standard Edition 5.0 or J2SE 5 or J2SE 1.5), codenamed Tiger, was discharged in September 2004. Java 5 has passed its life range, and the Sun’s backing for it terminated in November 2009. It had 3200+ classes and interfaces. Java 5 presented a few noteworthy redesigns, for example, dialect upgrades (i.e. Comments, Generics, Autoboxing, and enhanced language structure for circling) among numerous others. Comment is a component for labeling classes with metadata so that, they can be utilized by metadata-mindful projects. Generic is a system of indicating sorts for articles having a place with accumulations, for example, ArrayList, so that sort security is ensured at arranging a time. Autoboxing permits the programmed changes between primitive sorts (e.g. int) and wrapper sorts (e.g. Whole number). Enhanced grammar for circling incorporates the improvements for every circle for experiencing the things of cluster or accumulations nearly effectively.


Java 6

Java 6 (otherwise called Java Standard Edition 6.0 or Java SE 6 or Java 1.6), codenamed Mustang, was discharged in December 2006. Current correction is the Update 26, which was discharged on June 2011. It has 3700+ classes and interfaces. It concentrates on new details and APIs including XML, Web Services, JDBC adaptation 4.0, programming in view of Annotations, API’s for Java compiler and Application customer GUI. Additionally, the backing for a more seasoned form of Windows (Win9x arrangement) will be expelled beginning from the Update 7.

Key Differences

  • The Java 6 has the JAX-RX 1.1 not present in the Java 5.
  • The RESTful web services are available in the Java 6 only.
  • The JAXR is included in the Java 6.
  • The latest version between these two versions of Java is Java 6.