Computer Science Fundamentals (CS153 2004S)
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[Instructions]
[Links]
[Search]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[Experiments in Java]
[Java API]
[Scheme Reference]
[Scheme Report]
[CS153 2003S]
[CS151 2003F]
[CS152 2000F]
[SamR]
Back to Getting Started with Object-Oriented Programming. On to Discussion of Exam 2.
Held: Wednesday, 10 March 2004
Summary: Today we begin our exploration of the Java programming language.
Related Pages:
Due
Notes:
Overview:
a simple, object-oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high-performance, multithreaded, and dynamic language.
fluentin Java.
main method that directs everything
else.
main method generally
import java.io.PrintWriter; // Introduce shorthand
/**
* Your first Java program.
*
* @author Samuel A. Rebelsky // Author of the program
* @version 1.2 of March 2004 // Version of the program
*/ // End of introductory comment
public class FirstProgram // Class declaration
{ // Start body of class
public static void main(String[] args) // Declare main method
{ // Start body of main method
PrintWriter output; // Declare variable
output = new PrintWriter(System.out,true);
// Create object
output.println("That's it!"); // Call object method
} // main(String[] args) // End body of main method
} // class FirstProgram // End body of class
output,
and tells it to do one thing, print a string.
languages.
% javac file.java
javac (Java compiler).
% java file.class
java (Java interpreter).
export PATH=/usr/java/j2sdk1.4.1_03/bin:$PATH
Back to Getting Started with Object-Oriented Programming. On to Discussion of Exam 2.
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[Instructions]
[Links]
[Search]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[Experiments in Java]
[Java API]
[Scheme Reference]
[Scheme Report]
[CS153 2003S]
[CS151 2003F]
[CS152 2000F]
[SamR]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Fri May 7 09:43:20 2004.
The source to the document was last modified on Tue Jan 13 10:26:11 2004.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS153/2004S/Outlines/outline.29.html.
You may wish to
validate this document's HTML
;
;
Check with Bobby