How Programs Work
Most computer programs are written in the same way that you write a letter—by typing each statement into a text editor. Some programming tools come with their own editor, and others can be used with any text-editing software.
When you have finished writing a computer program, you save the file to disk. Computer programs often have their own filename extension to indicate what type of file they are. Java programs must have the extension .java, as in Calculator.java.
Note
If your text editor is a word processing program that has features such as boldface text, font sizes, and other stylistic touches, do not use those features while writing a computer program. Programs should be prepared as text files with no special formatting. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access