Java Reference
In-Depth Information
1980s: Macintosh desktop computers in 1983 came with no internal hard drive,
memory of about 256,000 bytes (1/4 megabyte!), and only a 3/4 megabyte flop-
py disk drive. (We sometimes wonder how anyone ever got any work done with
such low-powered hardware.)
All storage devices use the same system of storing data that memory does:
a sequence of bytes. But the way these bytes are stored, physically, differ from
device to device.
0.2
Computer software
Computers are almost as common as microwave ovens and DVD players.
People use computers for many common tasks: word processing, main-
taining checkbook records, surfing the internet, and playing games.
They use computers, often without knowing it, when they use an ATM,
pay a bill by credit card, make a telephone call, and even drive their car
(at least the newer cars). Most people, however, do not know how a
computer works or how it is told what to do. They use computers only
for services provided by applications written by others. Microsoft Word,
Apple's iTunes, the browser that you use to surf the internet, the mailer
you use to send and receive email, the thing that downloads an MP3 file,
and the thing that plays the MP3 file —all these are examples of appli-
cations.
A program is simply a set of instructions to be carried out or executed by a
computer, much like a cooking recipe is a set of instructions for a chef (or you)
to carry out. A program is written in a notation called a programming language.
The language could be C, C++, Java, Python, ML, Scheme, Fortran, or one of
hundreds of other programming languages that have been developed since the
advent of computers in the 1940s. The task of a programmer is to program, i.e.
to write a programs. In this text and accompanying CD, you will learn how to
program (i.e. write programs) in the Java language, one of the newer and more
popular programming languages.
An application is a collection of programs that together accomplish some
task, like the collection of programs that make up Microsoft word or the Norton
utility to service your hard disk.
Compiling and executing a program
Programming languages are designed for humans to write and read.
Programs, sometimes called source programs, cannot be executed immediately
by a computer because they are not in the language of the computer itself, called
the machine language .
Consider the expression x+y*z , which can appear in almost any program-
ming language. The machine language version of this expression could consist
of detailed instructions that do the following (remember: a register is a place in
the CPU to hold a value).
 
Search WWH ::




Custom Search