Re: Is there an easy way to find the right class?



Farcus Pottysquirt wrote:
what if I was sitting down with only a pad of paper, a pencil (with an eraser) and a reference like Java In a Nutshell (O'Reilly) how would I find the class/package I need without looking at each and every one until I find it? There must be an easier way. Internet access makes it somewhat easier, but even Google provides more information than I need.

This is a Zen question.

The short answer is that you simply have to know the API. That means a lot of time constantly studying a moving target.

The tutorials help, with a few packages like the Collections framework.
<http://java.sun.com/docs/books/tutorial/collections/index.html>
(Written by Josh Bloch!)

Or in depth tutorials like
<http://java.sun.com/developer/onlineTraining/essentials/>

Aside from that I recommend studying the API package by package.

Here's a good place for studying java.util.
<http://java.sun.com/j2se/1.5.0/docs/api/java/util/package-summary.html>

You can go a long time knowing only a subset. For example, I am only now finally after forever getting around to studying the NIO packages.
<http://java.sun.com/javase/6/docs/api/java/nio/package-summary.html#package_description>
<http://java.sun.com/javase/6/docs/api/java/nio/channels/package-summary.html#package_description>

GIYF.

- Lew
.



Relevant Pages