Tuesday, 31 March 2015

New Features of Java 4,5,6,7

New Features in Java
There are many new features that have been added in java. There are major enhancement made in Java5, Java6 and Java7 like auto-boxinggenericsvar-argsjava annotations,enumpremain method etc.

J2SE 4 Features

The important feature of J2SE 4 is assertions. It is used for testing.
  • Assertion(Java 4)

J2SE 5 Features

The important features of J2SE 5 are generics and assertions. Others are auto-boxing, 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)

JavaSE 6 Features

The important feature of JavaSE 6 is premain method (also known as instrumentation).
  • Instrumentation (premain method) (Java 6)

JavaSE 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)
  • Caching Multiple Exceptions by single catch (Java 7)
  • Underscores in Numeric Literals (Java 7)

No comments:

Post a Comment

Access attributes in component

NOTE: To access an attribute in a  component , use expressions as  {! v.<Attribute Name>} . ----------------------------------------...