It seems we're getting a rash of people looking for quick and easy answers to their programming problems. Often times, we are directing them to the Java documentation (API) to learn for themselves. Usually that is the first place that I go, but here's my *silly* problem: I'm not quite sure how to read it. It would be great if we could get a bunch of posts on HOW to get through the API to figure what methods are available, how to use them, and what they do. I'm sure eveyone has some different tips and tricks, and any of them would be great! I'm sure there are QUITE a few beginners (including myself) that could benefit from this discussion. To keep things simple, let's keep responses limited to either of these two situations:
I'm using the 'frames' version of the API (installed locally). What tricks can I use to surf the tree? What the best way to figure out how to use API classes? Thanks for the help, guys! (and gals!)
-nothing important to say, but learnin' plenty-
Whenever I want documentation, I go to Google and type "javax.mail.SendFailedException" or whatever class I'm looking for, and the first link is usually Sun's on-line documentation (you may have to change the version numebr in the URL, but that's fine by me...) If I'm looking for information on a particular package, I do the same, but type the package name instead of the class name. Same results. If I don't know the package, I come to JavaRanch to ask "what will allow me to do xxx..." And, if I'm off-line, I refer to my copies of Java In a Nutshell, Java Foundation Classes in a Nutshell, and Java Enterprise in a Nutshell. It's not the same detail of information, but they do provide good overviews and usage examples.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Usually when I'm stuck it is becasue I know there is method out there and I dont know the exact name or parameters for it. I have this page bookmarked. When I get there I just got to the API link on the left. If after reading the API I'm still confused or unsure I can go back and use on of the tutorials to find an example of what I'm looking to use. I normally use the framed version and use the entire list of all classes and just scroll through it. Biggest tip when looking for a method is not to forget to look at the inherited methods section in the API.
David, In the courses I instruct, I have the students actually download a copy of API docs to their pc so it will be handy and I reqire that they document to the javadoc statndards and generate the javadocs for everything they submit. I also have a running "suggestion" to them that when the text references a class they have not used that they run out and read the javadocs. The above sets a context for understanding the API javadocs in two ways - one they know how the docs were created and they start to get used to reading them. -steve