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.
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.
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.