Java Reference
In-Depth Information
27
Programming activity centers around these steps. Start in the editor, writing the source
file. Compile the program and look at the error messages. Go back to the editor and fix
the syntax errors. When the compiler succeeds, run the program. If you find a run-time
error, you must look at the source code in the editor to try to determine the reason.
Once you find the cause of the error, fix it in the editor. Compile and run again to see
whether the error has gone away. If not, go back to the editor. This is called the editÏ
compileÏtest loop (see Figure 14 ). You will spend a substantial amount of time in this
loop when working on programming assignments.
The Java virtual machine loads program instructions from class files and library
files.
S ELF C HECK
17. What do you expect to see when you load a class file into your text
editor?
18. Why can't you test a program for run-time errors when it has compiler
errors?
CHAPTER SUMMARY
1. A computer must be programmed to perform tasks. Different tasks require
different programs.
2. A computer program executes a sequence of very basic operations in rapid
succession.
3. A computer program contains the instruction sequences for all tasks that it can
execute.
4. At the heart of the computer lies the central processing unit (CPU).
5. Data and programs are stored in primary storage (memory) and secondary
storage (such as a hard disk).
6. The CPU reads machine instructions from memory. The instructions direct it to
communicate with memory, secondary storage, and peripheral devices.
Search WWH ::




Custom Search