Java 5 Vs. Java 6
Java 5 and Java 6 are similar in many ways; most, if not all, code written for Java 5 will run under Java 6. However, there are some important differences between them. Like all previous Java releases, Java 5 and Java 6 are intended to be work well under any operating system using the JVM (Java Virtual Machine).
-
Speed
-
This design has been Java's best asset but also its greatest liability, as it makes it slower than most lower level languages. Like previous releases, Java 6 aims to be faster than its predecessors. Sun Microsystems, the creators of Java, claims that Java 6 will make previously written code run faster without any need to alter or recompile it. The majority of benchmarks support this claim; simply put, Java 6 runs faster than Java 5 but still does not match the speed of most lower level languages, such as C++.
User Interfaces
-
In the past, developing a user interface in Java was a time consuming and somewhat difficult task. Java 6 aims to make this easier by implementing various tools such as SwingWorker and JTable. Sun has also implemented some improvements to the native graphical user interfaces for Windows, Linux and Solaris, an operating system developed by Sun; Mac OS X comes with Java integrated out of the box, including a graphical user interface.
-
Debugging
-
Java 6 includes new or, in some cases, improved monitoring and management tools, including the "infamous" Jhat, which is used to explore core dumps. It also includes more diagnostic information, making bug fixing somewhat easier.
Databases
-
Java DB, a new database management tool, has been included and is, like the rest of the release, free to use. Java DB is based on the open-source Apache Derby and is supported by Sun. This DB system has a footprint of only 2.5MB and can run on anything from PDAs to large mainframes. It complies with CDC, Java, JDBC and SQL. Java DB offers all of the standard security features one would expect from a enterprise-worthy database system including file encryption, both external and internal forms of authentication, and the database can be made read only or write only.
Verdict
-
Overall, Java 6 is an improvement on previous releases. With its built-in debugging tools and speedier run-times, it will quickly become the standard over Java 5. Given Java 6's backward compatibility with code written in Java 5, there is little reason to delay in moving to the newer release.
-
References
- Photo Credit Image by Flickr.com, courtesy of Demion