Following are some reasons to upgrade to Java 1.5:
- The latest JVMs perform much more efficiently.
- Assert facility -- allows programmers to make statements about what they believe their program is doing and quickly uncovers misconceptions.
- Generics -- allows much enhanced type safety (at compile time, as opposed to runtime), and eliminates casting.
- Enhanced for loops -- eliminates error prone indexing of for loops and loops that are easier to understand.
- Auto boxing and unboxing -- eliminates manual conversion between primitives and class types and results in cleaner and easier to read code.
- Type safe enumerations -- much cleaner, easier to use, and safer than current techniques of using a combination of constant ints, strings, and arrays.
- Regular expressions -- very, very useful for parsing and validating strings.
- Static import -- less typing and cleaner code
- Chained exceptions -- better error reporting and reduced chances of losing exception information.
- Logging API -- very useful for server applications.
-
Larger API to work with including:
- JDBC (database connectivity) updates.
- New classes for threading (concurrency).
- New IO classes.
- New classes for converting between strings and various types.
- New XML processing classes, including XPath (very useful).
- New security classes.
- New Java 2D drawing and image IO framework.
- New printing API.
- Lots of changes to Swing/AWT.
- New collection classes and interfaces.