Where can I see the source code of the Sun JDK?

ashokgelal picture ashokgelal · Nov 4, 2008 · Viewed 88.9k times · Source

I want to have a look at how Java implements LinkedList. Where should I go to look at the source code?

Answer

Bill Karwin picture Bill Karwin · Nov 4, 2008

Install the Java SE Development Kit from http://java.sun.com/javase/downloads/index.jsp.

Once installed, you should find an archive called src.zip in the top of the JDK installation directory. The Java source code is in there.

The file is java/util/LinkedList.java.

update: You may also like to visit the online OpenJDK Source repository. See this answer below.