File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Usage of Java API's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Usage of Java API Watch "Usage of Java API New topic

Usage of Java API's

yashpal patel

Joined: Jan 13, 2006
Posts: 6
hi everybody,

i am new to java and would like to ask one general question relating to java.

There are many packages in java with each package having many classes,Interfaces and each class in turn having lot of methods within it.Now my question is how can one know that a particular method which performs a particular function is in which class . While programming when one wants a particular task to be performed,how can one know/find a method which can help him achieve the task that he/she wants.I find it difficult and time consuming in order to find a method which really suites to my need.

I am a beginner in java and want to know some very good website in which there are lot of sample code examples in java.In that way i guess i can better understand the concept.Again i repeat that i am a absolute beginner but want to learn java.I guess by reading sample code samples,referring to java API for the methods and classes used in program,one can understand it better.

Waiting for your guidance guys

Thanking you in Advance

Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3749

[OCA 8 Book] [Blog]
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

I find that when I'm looking for a particular method (if I don't know where or even what it is) I start by looking at the list of packages in the API. That generally gives me a good starting point. From there I look at the class names in the package, looking for one that might do what I'm looking to do. Then (after reading the javadoc for the class), I look through the methods, finding the one that I want.

It's useful to have a reference book handy, as well. I used O'Reilly's Java In a Nutshell until I got a good handle on what was where in the API. (That book provides descriptions of the packages/classes/methods that are different from JavaDoc's, and there's usually a section for each package describing how to use the package to perform common tasks).

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
You should also go through Sun's tutorials. There are several trails that describe specific sub-APIs (like the Collection Framework or Swing). Use these tutorials to help you understand the parts of the API that you will use most often. Even if you don't remember specific classes and methods, this will at least help you know where to start looking.


Java API Documentation
The Java Tutorial
I agree. Here's the link:
subject: Usage of Java API's
It's not a secret anymore!