magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 05 > Java@Work  

Java's New Collections

In my opinion, collection classes are among the most powerful tools for raw programming. You might have gathered that I'm somewhat disappointed in the collections provided in Java through version 1.1. As a result, it's a tremendous pleasure to see that collections have been given proper attention in Java 1.2, and thoroughly redesigned (by Joshua Bloch at Sun). I consider the new collections to be one of the two major features in Java 1.2 (the other is the Swing library, covered previously in this column) because they significantly increase your programming muscle and help bring Java in line with more mature programming systems.

Some aspects of the redesign make things tighter and more sensible. For example, many names are shorter, cleaner, and easier to understand, as well as easier to type. Some names have been changed to conform to accepted terminology: a particular favorite of mine is "iterator" instead of "enumeration." The redesign also fills out the functionality of the Collections library. You can now have the behavior of linked lists, queues, and dequeues (double-ended queues, pronounced "decks").

The designers of the new Collections library wanted to strike a balance: the full functionality that you expect from a mature Collections library, but easier to learn and use than, say, the Standard Template Library (STL) in C++. The result can seem a bit odd in places. Unlike some of the decisions made in the early Java libraries, these oddities were not accidents, but carefully considered decisions based on tradeoffs in complexity.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2