Chapter 1 Introduction to Computers, the Internet and the Web 3
© Copyright 1992–2002 by Deitel & Associates, Inc. All Rights Reserved. 7/8/01
downloaded from our Web site www.deitel.com and they are available on our interac-
tive CD product, the Java 2 Multimedia Cyber Classroom: Fourth Edition. The Cyber
Classroom’s features and ordering information appear at the back of this book. The Cyber
Classroom also contains answers to approximately half of the solved exercises in this book,
including short answers, small programs and many full projects. If you purchased The
Complete Java 2 Training Course: Fourth Edition, you already have the Cyber Classroom.
The early chapters introduce the fundamentals of computers, computer programming
and the Java computer programming language. Novices who have taken our courses tell us
that the material in those chapters presents a solid foundation for the deeper treatment of
Java in the later chapters. Experienced programmers tend to read the early chapters quickly
and find that the treatment of Java in the later chapters is rigorous and challenging.
Many experienced programmers have told us that they appreciate our structured pro-
gramming treatment. Often, they have been programming in structured languages like C or
Pascal, but they were never formally introduced to structured programming, so they are not
writing the best possible code in these languages. As they review structured programming
in the chapters “Control Structures: Part 1” and “Control Structures: Part 2,” they are able
to improve their C and Pascal programming styles as well. So whether you are a novice or
an experienced programmer, there is much here to inform, entertain and challenge you.
Most people are familiar with the exciting tasks computers perform. Using this text-
book, you will learn how to command computers to perform those tasks. It is software (i.e.,
the instructions you write to command computers to perform actions and make decisions)
that controls computers (often referred to as hardware), and Java is one of today’s most
popular software-development languages. Java was developed by Sun Microsystems and
an implementation of it is available free over the Internet from the Sun Web site
java.sun.com/j2se
This book is based on the Java 2 Platform, Standard Edition, which describes the Java lan-
guage, libraries and tools. Other vendors can implement Java development kits based on the
Java 2 Platform. Sun provides an implementation of the Java 2 Platform, Standard Edition
called the Java 2 Software Development Kit, Standard Edition (J2SDK) that includes the
minimum set of tools you need to write software in Java. At the time of this publication, the
most recent version was J2SDK 1.3.1. You can download future updates to the J2SDK from
the Sun Web site java.sun.com/j2se.
Computer use is increasing in almost every field of endeavor. In an era of steadily rising
costs, computing costs have been decreasing dramatically due to rapid developments in both
hardware and software technology. Computers that might have filled large rooms and cost
millions of dollars two decades ago can now be inscribed on the surfaces of silicon chips
smaller than a fingernail, costing perhaps a few dollars each. Ironically, silicon is one of the
most abundant materials on earth—it is an ingredient in common sand. Silicon-chip tech-
nology has made computing so economical that hundreds of millions of general-purpose
computers are in use worldwide helping people in business, industry, government, and in their
personal lives. The number of computers worldwide easily could double in the next few years.
This book will challenge you for several reasons. For many years, students learned C or
Pascal as their first programming language. They probably learned the programming meth-
odology called structured programming. You will learn both structured programming and the
exciting newer methodology, object-oriented programming. Why do we teach both? We