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

有些话、适合烂在心里 提交于 2019-12-09 15:10:10

问题


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?


回答1:


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




回答2:


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.




回答3:


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




回答4:


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.



来源:https://stackoverflow.com/questions/2302042/how-to-get-up-to-date-search-results-when-searching-for-javadoc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!