Java 4 Features | New Feature in Java

JDK 1.4 is one of the major versions released in February 2002. The work started on the name of “Project Merlin” and includes the developments to support XML processing, java.nio package addition, Security restrictions, Logging API, JDBC 3.0 API, Assertions, Chained exceptions, Regular expressions and Drag and Drop. Two of these features, Assertions and Regular expressions are discussed here and the remaining are illustrated in the respective topics.

  • Language changes
    • assert keyword (specified in JSR 41)
  • Library improvements
    • Regular expressions modeled after Perl regular expressions
    • Exception chaining allows an exception to encapsulate original lower-level exception
    • Internet Protocol version 6 (IPv6) support
    • Non-blocking IO (named New Input/Output, NIO) (specified in JSR 51)
    • Logging API (specified in JSR 47)
    • An image I/O API for reading and writing images in formats like JPEG and PNG
    • Integrated XML parser and XSLT processor (JAXP) (specified in JSR 5 and JSR 63)
    • Integrated security and cryptography extensions (JCE, JSSE, JAAS)
    • Java Web Start included (Java Web Start was first released in March 2001 for J2SE 1.3) (specified in JSR 56)
    • Preferences API (java.util.prefs)