| Scott Grissom School of Computing & Info Systems Grand Valley State University |
|
|||
CS 162 Computer Science I | |||
| Syllabus | Schedule & Assignments | Help | Gradebook |
PreparationDo the following before arriving at lab:
ObjectivesAfter completing this lab, you should be able to:
ExercisesGetting Started
Sample main methodpublic static void main(String [ ] args){
GUI g = new GUI();
}
Invoking an application from the command lineYou have discovered that BlueJ is a handy tool to write and run java programs. However, you can also create java programs with a simple text editor. It is important you have a basic understanding of this process.
Create a program away from BlueJTraditionally, the first program a student writes is called Hello World. It simply prints a message to the screen. You have written much more advanced programs with the help of BlueJ. You will now write your first java program without the help of BlueJ.
Hello World class/** This is comment about the class @author Scott Grissom @version November 28, 2006 */ public class Hello{
public static void main(String [] args){
System.out.println("Scott says 'Hello World'");
}
}
A double-clickable applicationAnother way to invoke an application outside of BlueJ is to double click on a .jar file. However, this jar file must be created. You can easily do this within BlueJ.
Grading CriteriaThis lab is worth a possible 10 points. Turn in a printout of Hello World source code (including brief comments).
|