How Programs Work

Most computer programs are written in the same way that you write a letter—by typing each statement into a word processor. Some programming tools come with their own word processor, and others can be used with any text-editing software. If you don't already have a tool that can be used for Java programming, you can use the free Java Development Kit, which you will learn about later in this hour, with any of your favorite editors.

When you have finished writing a computer program, you save the file just like saving any other document to disk. Computer programs often have their own filename extension to indicate what type of file they are. Java programs have the extension .java; an example of a Java program filename is Calculator.java ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.