Andy wrote:
I use Netbeans to write all my code and I've noticed that if I do it
wrong and the program throws an (unexpected) exception, it becomes
possible to see the source code for the all the classes used leading
up to the exception.
I presume it must be possible therefore to somehow view the source
code for all the classes in sun's library (e.g. Swing, awt, sql).
I reckon this would be a pretty good way of learning how to write good
java.
For professional reasons I've never looked at Sun's source code : however
those that have tell me that it's nothing to write home about.
You would do better to delete src.zip right away, and study the code of
Wonka or Classpath instead. You'll find some good code there too, and more
important you'll be able to do something with what you learn: improve some
of the less good bits or fill in the gaps. With Sun's code, if something
looks to you like it could be done better then there's not much you can do:
with an open source project you can propose an improvement, and either you
will be thanked or the original dveloper will tell you just why you're
wrong. :)
--
Chris Gray
ch***@kiffer.eunet.be
/k/ Embedded Java Solutions