I have heard a lot of people saying that to be a good programmer one needs to read a lot of good code.
Can you help me find some good code in Java?
The source code for the standard Java library is often good to read, because it consists of small functions which do well-defined things.
I think you can download the source for Java 1.7 from Sun Oracle, and there are all kinds of open-source remakes of the standard Java library.
I would recommend you to take a look at various open-source projects. As their code is freely available, it tend to be of honorable quality.
To access those sources, you can go on http://koders.com or its alternatives (see as an example this question on C++)
Pick your favorite open source library and start reading that. This will have the ancillary benefit of helping you gain a deeper understanding of how the library works. Here is a pretty good list of open source java libraries.
However, I find it more useful to tackle a programming problem myself, and then afterwords see how others approached the same problem. Project Euler is a great place to do this. Just my personal preference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With