Java Reference
In-Depth Information
1.1 Introduction
The central theme of this topic is to learn how to solve problems by writing a program.
Key
Point
This topic is about programming. So, what is programming? The term programming means to
create (or develop) software, which is also called a program. In basic terms, software contains
the instructions that tell a computer—or a computerized device—what to do.
Software is all around you, even in devices that you might not think would need it. Of
course, you expect to find and use software on a personal computer, but software also plays a
role in running airplanes, cars, cell phones, and even toasters. On a personal computer, you use
word processors to write documents, Web browsers to explore the Internet, and e-mail pro-
grams to send and receive messages. These programs are all examples of software. Software
developers create software with the help of powerful tools called programming languages.
This topic teaches you how to create programs by using the Java programming language.
There are many programming languages, some of which are decades old. Each language
was invented for a specific purpose—to build on the strengths of a previous language, for
example, or to give the programmer a new and unique set of tools. Knowing that there are
so many programming languages available, it would be natural for you to wonder which
one is best. But, in truth, there is no “best” language. Each one has its own strengths and
weaknesses. Experienced programmers know that one language might work well in some
situations, whereas a different language may be more appropriate in other situations. For this
reason, seasoned programmers try to master as many different programming languages as
they can, giving them access to a vast arsenal of software-development tools.
If you learn to program using one language, you should find it easy to pick up other languages.
The key is to learn how to solve problems using a programming approach. That is the main
theme of this topic.
You are about to begin an exciting journey: learning how to program. At the outset, it is
helpful to review computer basics, programs, and operating systems. If you are already familiar
with such terms as CPU, memory, disks, operating systems, and programming languages, you
may skip Sections 1.2-1.4.
what is programming?
programming
program
1.2 What Is a Computer?
A computer is an electronic device that stores and processes data.
Key
Point
A computer includes both hardware and software. In general, hardware comprises the visible,
physical elements of the computer, and software provides the invisible instructions that control
the hardware and make it perform specific tasks. Knowing computer hardware isn't essential
to learning a programming language, but it can help you better understand the effects that
a program's instructions have on the computer and its components. This section introduces
computer hardware components and their functions.
A computer consists of the following major hardware components (Figure 1.1):
hardware
software
A central processing unit (CPU)
Memory (main memory)
Storage devices (such as disks and CDs)
Input devices (such as the mouse and keyboard)
Output devices (such as monitors and printers)
Communication devices (such as modems and network interface cards)
A computer's components are interconnected by a subsystem called a bus. You can think
of a bus as a sort of system of roads running among the computer's components; data and
power travel along the bus from one part of the computer to another. In personal computers,
bus
 
 
 
Search WWH ::




Custom Search