Viewing the Code behind Java's Predefined Elements

Hello,

I'm new to computers and programming, and I've decided to start with Java.

I'm done with syntax (easy enough) and am now just learning about certain special packages like io, lang, etc.

However, I'm beginning to think that I made a mistake with starting with Java.

I don't really understand how to interact with the machine; all I do is use predefined methods to do my dirty work for me.

So, I'm wondering if I can see the code that the developers used to build the predefined elements of the language.

For example, for a simple method call like System.out.print("string goes here"); how did the developers tell the computer to print that string to the command window?

What does that code really look like?

Thanks.
 

mihir

VIP Member
Hello,

I'm new to computers and programming, and I've decided to start with Java.

I'm done with syntax (easy enough) and am now just learning about certain special packages like io, lang, etc.

However, I'm beginning to think that I made a mistake with starting with Java.

I don't really understand how to interact with the machine; all I do is use predefined methods to do my dirty work for me.

So, I'm wondering if I can see the code that the developers used to build the predefined elements of the language.

For example, for a simple method call like System.out.print("string goes here"); how did the developers tell the computer to print that string to the command window?

What does that code really look like?

Thanks.
You can download the JDK source code and checkout the function definitions there.
http://download.java.net/openjdk/jdk7/
But I would suggest being abstracted from all that since that code is written over a lot of time, and when starting off with a new language it can become scary to see the library code. If you use an IDE like Eclipse or Netbeans or IntelliJ it becomes a lot easier checking these methods out.

I would suggest doing some koans and katas with Java to learn better. Besides trust me, you don't want to go in the bowels of the language to begin with.
http://codekata.com/
https://github.com/matyb/java-koans
 

C4C

Well-Known Member
Java is one of those codes that doesn't make sense at first.. I've been messing with it for about a year now while editing Minecraft mods and I still don't understand even the basics..

Agent Smith linked to a good page, and Mihir provided a link to the definitions.. I think you're set..

Bump
 
Top