

For a simple program like the above, it may very well Eclipse knows what a valid Java program looks like,īut doesn't understand whether or not the program you wrote does what Only knows how to spell and the rudiments of grammar, it does not how to That your program will work correctly! Just as your word processor The difference with the codeĪlso, note that even if the red lines disappear, this doesn't mean In the textbook or align them as shown in the code above. You can align the braces as shown in the code examples If there are still some left,Ĭompare the above image with the file you wrote until you find theĭifference. Red lines will eventually disappear, though it is normal for some toĪppear as you are writing programs. If you follow the above and type the code correctly, the This is Eclipse's attempt to correct you, the same way a word

It will also open a tabbed window where you can This step will create a new file named HelloWorld.java andĪdd it to the project for you. "Name:" and type in HelloWorld, as in the followingĬlick Finish. Pane on the left side of the screen and navigate to New → Class,

Right-click on the "HelloWorld" project in the Package Explorer tabbed
