• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to use Java documentation

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!)
 
Ranch Hand
Posts: 1067
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The API takes a while to get used to. I bought "Java in a Nutshell" and that helped me. It breaks down the APIs and gives you examples.
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 612
7
Mac OS X Python
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic