Launch Create Edit Run |
This step will show you how to edit a source file in Eclipse.
Also, note that even if the red lines disappear, this doesn't mean that your program will work correctly! Just as your word processor only knows how to spell and the rudiments of grammar but not how to write an essay, Eclipse knows what a valid Java program looks like, but doesn't understand whether or not the program you wrote does what you want it to. For a simple program like the above, it may very well work as soon as it is recognized as a valid Java program, but for more complicated programs, validity is only the tip of the iceberg.
It's also worth mentioning that Eclipse will fill things in for you. For example, if you put a left parenthesis (, it will follow it up with a right parenthesis ). You can keep on typing and fill in the space between the parentheses. When you're done, you can either manually type the end parenthesis ), which will type over the old one, or you can press the right arrow key to skip past the old one.
/////////////////////////////////////////////////////////////////////////////// // ALL STUDENTS COMPLETE THESE SECTIONS // Title: (program's title) // Files: (list of source files) // Semester: Spring 2007 // // Author: (your name and email address) // CS Login: (your login name) // Lecturer's Name: (name of your lecturer) // Lab Section: (your lab section number) // // PAIR PROGRAMMERS COMPLETE THIS SECTION // Pair Partner: (name of your pair programming partner) // CS Login: (partner's login name) // Lecturer's Name: (name of your partner's lecturer) // Lab Section: (your partner's lab section number) // // STUDENTS WHO GET HELP FROM ANYONE OTHER THAN THEIR PARTNER // Credits: (list anyone who helped you write your program) //////////////////////////// 80 columns wide //////////////////////////////////
You save the file by clicking on the disk icon. Files that have been modified since last save will have an asterisk before the file name, as in the above image.
Launch Create Edit Run |
Last modified September 6, 2005
Original version created by Sue Hazlett
Updated for Eclipse by Martin Hock
Updated for lab section use by Rebecca Hasti