473,396 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

teach us how to read/use Java APIs

I have downloaded and bookmark the API documentation...
Kindly please anybody teach on how to read/use them...
for instance I browse Package java.io - then I check File.

There are Field Summary, Constructor Summary, Method Summary etc..
How can we use them...

I don't know how you guys so brilliant make use the java docs.

can we open one class how to use java docs?
thank you
May 22 '07 #1
4 2426
r035198x
13,262 8TB
I have downloaded and bookmark the API documentation...
Kindly please anybody teach on how to read/use them...
for instance I browse Package java.io - then I check File.

There are Field Summary, Constructor Summary, Method Summary etc..
How can we use them...

I don't know how you guys so brilliant make use the java docs.

can we open one class how to use java docs?
thank you
Those classes and methods are also explained in those docs. If you need to find the size of a file for example, you can check the docs for the File class and see which method is best for you.
May 22 '07 #2
rsrinivasan
221 100+
I have downloaded and bookmark the API documentation...
Kindly please anybody teach on how to read/use them...
for instance I browse Package java.io - then I check File.

There are Field Summary, Constructor Summary, Method Summary etc..
How can we use them...

I don't know how you guys so brilliant make use the java docs.

can we open one class how to use java docs?
thank you
Hi,

You can also use "javap" tools to view all the members for a particular class.

For example you want to know all the methods in Applet class just type in the command prompt...

c:\>java>javap java.applet.Applet
Thanks,
Srinivas r.
May 22 '07 #3
JosAH
11,448 Expert 8TB
I have downloaded and bookmark the API documentation...
Kindly please anybody teach on how to read/use them...
A very wise move; that documentation is necessary for almost everything you
write using Java.

short explanation:

From the index.html file scroll down to the header:

API, Language, and Virtual Machine Documentation

and click the entry:

Java Platform API Specification

Now you see three frames:

1) top left: a listing of all packages; the first link should've read 'all packages'
IMHO, but who am I? ;-)

2) bottom left: all classes present in the package you selected in frame 1)
in alphabetical order, or all classes present in the core library

3) right: either a short overview of all the packages or, a detailed description
of every class. The latter will only show up afer you've selected a class in frame 2)

The detailed class description is the most valuable one; scroll down in frame 2)
and select a class. Names in Italics are interfaces; names in normal font are
classes.

The top and bottom parts of that frame show some navigational links: previous
or next class in the alphabetical listing; summaries and detailed descriptions
of constructors, methods, fields, nested members etc.

The next section shows a general explanation of the class. Following sections
show what the links indicated (read the previous paragraphs), but of course you
can also simply scroll up and down to read those sections.

The summaries give you a quick overview of all the fields, methods etc. while
the detailed descriptions give you a, well, detailed description of the item.

Try to find the 'Object' class in frame 2), select it and see the consistent
structure of the page in frame 3). After a bit of playing with it you get the hang
of it and you never want to miss it again when you have to develop software.

All that documentation was generated by JavaDoc: that tool grabbed all comment
lines from the source files and built those nice html pages.
Your JDK comes with that same usefull JavaDoc tool so you can document your
own code in the same consistent way (hint, hint).

kind regards,

Jos
May 22 '07 #4
that explanation was nice, Jos. if you can't read the api that means you're new to java. fine. whenever you're reading up any topic in a textbook or tutorial, just ask yourself, how did the creators of the java programming language solve this problem or implement this feature in this tutorial? go to the api, read the description for the class or classes you're interested in first, then read up the explanation for the class, then read the summarised fields and methods of that class or the classes you're interested in. then switch back to your tutorial.
it'll help a lot if you read the api while learning java.
emekadavid
May 22 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Simon Wigzell | last post by:
I recently wrote a program with MS Visual Studio C++, sent it off to the client where it didn't run, after some probing I discover they are on a Mac! My program is a MSF interface that is really...
1
by: TI | last post by:
Where would you start if you wanted to program perhaps a java application to enable a bluetooth mobile phone to work as walkie-talkie? ( schematics, compilers... ) thanks
235
by: napi | last post by:
I think you would agree with me that a C compiler that directly produces Java Byte Code to be run on any JVM is something that is missing to software programmers so far. With such a tool one could...
30
by: somebody | last post by:
I'm posting a new message regarding this subject, since the one posted previously is getting rather large. I just received the June 2005 issue of Dr. Dobb's Journal, and it contains an article...
4
by: acemann7 | last post by:
Windows 2000 udb v 7.2 Got the latest fixpak 13 Applied it. Still can't get a single java sp to run. I used to get reason "2"... now reason "0" - reason 0 is not even documented. I point...
4
by: Elhanan | last post by:
hi.. all a client of ours is considering to move from a dos application to windows desktop application. the application is for traveling agency, the database is rather large. their current...
11
by: jim shirreffs | last post by:
Hello, I am trying to put together a Java system for playing audio CDs on a large CD player, I have most of it working But entering all the data like Artist, Title, track name, track length...
2
by: Manoj Kumar P | last post by:
Hi, I'm new to python. I would like to know whether is it possible to access Java/C++ APIs from python. I have two applications written in Java and API, I wanted to call the APIs of these...
2
by: ramasubramanian.rahul | last post by:
hi i am trying to call some java APIs from c . i use the standatd JNI calls to load the JVM from a c program and call all java functions by using a pointer to the jvm which was returned by the JNI...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.