Friday, January 15, 2010

Know the core libraries in Java

Java differs from other languages in that the number of classes and interfaces in its standard libraries is very large.Beginners to Java should take note that very many common tasks have already been implemented in the libraries. The most widely used packages are probably java.lang, java.util, java.sql, and java.io.

As well, the libraries

* are built by experts
* generally improve their performance over time
* are widely used, and form defacto standards

Implementing something which already exists in the libraries is probably wasted effort.Significant changes and additions to the standard libraries occur in each major release, and it pays to keep current. For example, the 1.4 release of the JDK includes regular expressions, assertions, logging services, and more, in its list of new features. The Java 5 release has several major new features, including generics, an enhanced for loop, enums, autoboxing, and metdata. The Java 6 release has no new language features, and is not as dramatic as the 1.5, but it still has some interesting new features, such as scripting, the JConsole monitoring tool, and various Swing improvements.

No comments: