tags:

views:

84

answers:

4

Recently I've observed a lot of people still giving links to javadocs of 1.4.2. This is not quite a good practice and I'd like to raise the question.

This happens because search engines (Google at least) give the old javadoc if one searches for, let's say, java.lang.String

So, how to get the javadoc for the correct (currently 1.6) version of JDK?

+4  A: 

In almost all cases, adding the version after the searched class gets the desired result on top. For example:

  • "java.lang.String 6"
  • "java.util.Collection 5"

(note - it's not "1.6" - only "6")

Bozho
+1  A: 

As they are updated, the tutorials are already referencing draft version of the Java 7 API. For example How to Use Tables refers to JTable.

trashgod
+1  A: 

I prefer to download and install the javadoc when I'm installing a new Java version.
So I always have the correct javadoc on the disk. Uses some disk space but it's faster and allows working offline.

Drawback: you can not copy&paste the links in a forum

Carlos Heuberger
+1  A: 

I've always been surprised that nobody at Google updates documentation searches to default to the latest versions.

I usually just add "Java 6" if I am searching for "Java 6" and "Galileo" if I am searching for Eclipse stuff (as I usually get the Eclipse 3.2 docs with a default search). Adding JavaDoc for good measure helps with the more obscure classes in general.

Uri