简体   繁体   中英

How to get up-to-date search results when searching for javadoc

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?

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")

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 .

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM