datta Nadgir wrote:Which would be the best practice? to go for API or source code of class ??
I basically agree with Stefan, but I'd say that it's far more important to learn how to
read an API.
Why? Because most of the time you are simply the
user of a class, and the API (if it's well written) should tell you everything you need to know about how to
use it.
Also: In the real world you simply don't have
time to plough through the source code for every class you encounter - if it's even available.
Conclusion:
1. Try the API first.
2. If that doesn't provide enough information, have a look at the source.
3. Never, EVER,
rely on what you read
in the source, because it may change in the next release.
HIH
Winston