Programming and Problem Solving with Java

(やまだぃちぅ) #1

(^76) | Java Syntax and Semantics, Classes, and Objects
modify code by entering information into an area of the computer’s secondary
storage called afile.
A file in a computer system is like a file folder in a filing cabinet—a collection
of data that has a name associated with it. You usually choose the name for the
file when you create it with the editor. From that point on, you refer to the file by
the name you’ve given it. The Java compiler requires that files containing Java
code have the suffix .java.
So many different types of editors exist, each with different features, that we
can’t begin to describe them all here. We can, however, describe some of their general char-
acteristics.
The basic unit of information in an editor is a display screen full of characters. The ed-
itor lets you change anything that you see on the screen.
When you create a new file, the editor clears the screen to show you that the file is
empty. You then enter your program, using the mouse and keyboard to go back and make cor-
rections as necessary. Figure 2.5 shows an example of an editor’s display screen.
Figure 2.5 Display Screen for an Editor
File A named area in second-
ary storage that is used to hold a
collection of data; the collection
of data itself

Free download pdf