Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code reading sources [closed]

Tags:

java

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?

like image 918
Sid Avatar asked Jul 07 '10 13:07

Sid


3 Answers

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.

like image 169
Sjoerd Avatar answered Sep 30 '22 07:09

Sjoerd


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++)

like image 21
Riduidel Avatar answered Sep 30 '22 07:09

Riduidel


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.

like image 23
dbyrne Avatar answered Sep 30 '22 07:09

dbyrne