Monday, February 26, 2018

Using Online javadoc, Java Documentation

Note: Your feedback on how to improve this article is most welcome.

It may not be wise to use old javadoc for example,
http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html

Even though this is what our search engine shows first, usually.
However, methods may change from version to version, 
some times they are added,
removed or behavior may change.
Hence always use java doc (documentation) for the latest JDK

How to ensure that google gives result from javadoc for JDK 8?
Here are some interesting ways, just mention java 8 in your search.
Say, we want to search on math class. then write

java 8 math docs
http://www.google.com/search?q=java+8+math+docs

or like,
java 8 api math
http://www.google.com/search?q=java+8+api+math

It does not mean codes vary in different versions of JDK.
Mostly it does not. Codes are usually backward and forward (future) compatible.
However, things do change, slowly. Some of existing code may get
deprecated. There could be changes in behavior.

We should always try to use the latest version because better ways of
doing things may have been introduced and we want our code to keep
working in future JDKs as well.

Recommended Reading:
http://mindprod.com/jgloss/deprecated.html
http://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/deprecation/deprecation.html

No comments: