IntroJava

IntroJava - The Compilation Process source file#include...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 The Compilation Process #include <stdio.h> main() { printf("hello\n"); } 0100100101011001000 1000010100011101011 0110100111010101100 compiler source file object file 1001011010110001011 0100100101001011011 0101101011010100101 other object files and libraries 0100100101011001000 1000010100011101011 0110100111010101100 1001011010110001011 0100100101001011011 0101101011010100101 executable file linker Graphic courtesy of Eric Roberts The Java Interpreter import acm.program.*; public class Hello public void run() { println("hello"); } } CA FE BA BE 00 03 00 00 16 07 00 1A 07 00 00 04 00 07 0C 00 13 01 00 16 2B 4C 6A 61 compiler source file class file 47 72 61 70 68 69 63 2D 00 1F 08 00 0F 07 14 0A 00 02 00 08 0A 00 18 0C 00 17 00 1C other class files CA FE BA BE 00 03 00 00 16 07 00 1A 07 00 00 04 00 07 0C 00 13 01 00 16 2B 4C 6A 61 47 72 61 70 68 69 63 2D 00 1F 08 00 0F 07 14 0A 00 02 00 08 0A 00 18 0C 00 17 00 1C JAR archive linker JVM Hel o hello Graphic courtesy of Eric Roberts acm.program Hierarchy Applet JApplet Program DialogProgram GraphicsProgram ConsoleProgram Graphic courtesy of Eric Roberts The Add2Integers Program Add2Integers This program adds two numbers. Enter n2: The total is 42. 25 class Add2Integers extends ConsoleProgram { public void run() { println("This program adds two numbers.");
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/18/2010 for the course CS 106A taught by Professor Sahami,m during the Fall '08 term at Stanford.

Page1 / 2

IntroJava - The Compilation Process source file#include...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online