Menu object can
draw menus on the screen, but it's not important to you how it
does it.
main method that directs everything
else.
main method generally
import SimpleOutput; // Load library
/** // Introductory comment
* Your first Java 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
SimpleOutput output; // Declare variable
output = new SimpleOutput(); // 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.
.bashrc.
alias statements. These statements give easily used
abbreviations for common commants, to make our work simpler.
alias statements, add the
following lines:
# alias for Java alias jcompile="/net/jdk1.2.2/bin/javac" alias jrun="/net/jdk1.2.2/bin/java"and save your file.
% jcompile file.java
javac (Java compiler).
% jrun file
java (Java interpreter).
To continue with labs for this course, refer to Mr. Rebelsky's Web site for Experiments in Java.
This document is available on the World Wide Web as
http://www.cs.grinnell.edu/~walker/courses/152.sp01/lab-getting-started.html