Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i read java documentation? [closed]

Tags:

I'm looking for some advice on how to go about reading the online documentation of various packages classes and methods for java.

i mean all this stuff: http://java.sun.com/javase/6/docs/api/

like image 739
David Avatar asked Apr 05 '10 02:04

David


People also ask

How do I enable Java documents?

From the main menu, select Tools | Generate JavaDoc. In the dialog that opens, select a scope — a set of files or directories for which you want to generate the reference, and set the output directory where the generated documentation will be placed.

Where can I find Java documents?

applet package are contained in the C:\user\src\java\applet directory, then you could create an overview comment file at C:\user\src\overview. html. You can have multiple overview comment files for the same set of source files in case you want to run the javadoc command multiple times on different sets of packages.

Does Java have a documentation?

Whether you are working on a new cutting edge app or simply ramping up on new technology, Java documentation has all the information you need to make your project a smashing success.


1 Answers

Here's a tutorial.

And indeed, read it only when needed. For the remnant, go through a tutorial. Usually Googling "[keyword] tutorial site:oracle.com" yields enough results.

Update to take the following as an example for which you'd like to find the Javadoc:

someString.split("\\.");

Here someString is an instance of java.lang.String. Assuming that you'd like to start up from the API documentation root (I myself rather prefer to type just "java.lang.string javase api site:oracle.com" in Firefox's address bar to get it straight for me (if you feel lucky and didn't already have it in browser history), or to just check it in my IDE), then scroll in the main frame to the java.lang package and click the link, then in the class summary check the String class and click the link, then in the method summary check the split() method and click the link.

The Javadoc of the Java SE API is concise, but pretty complete and provides links to other javadocs where you expect them to be. For example, at the bottom of the String#split() javadoc you see a "See Also" link to the Pattern class, which in turn explains that regex stuff in the class' introduction.

like image 56
BalusC Avatar answered Nov 17 '22 09:11

BalusC