Java_Concepts__5th_Edition.pdf

(11059 KB) Pobierz
88980907 UNPDF
Java Concepts, 5th Edition
Java Concepts
Page 1 of 4
88980907.009.png
Java Concepts, 5th Edition
Java Concepts
F IFTH E DITION
Cay Horstmann
SAN JOSE STATE UNIVERSITY
John Wiley & Sons, Inc.
978-0-470-10555-9
Java Concepts
Page 2 of 4
88980907.010.png 88980907.011.png
Java Concepts, 5th Edition
Chapter 1 Introduction
1
Chapter 2 Using Objects
Chapter 3 Implementing Classes
Chapter 4 Fundamental Data Types
Chapter 5 Decisions
1
226
Chapter 6 Iteration
Chapter 7 Arrays and Array Lists
Chapter 8 Designing Classes
Chapter 9 Interfaces and Polymorphism
Chapter 10 Inheritance
Chapter 11 Input/Output and Exception Handling
Chapter 12 Object-Oriented Design
226
586
Chapter 13 Recursion
586
626
Chapter 14 Sorting and Searching
Chapter 15 An Introduction to Data Structures
Chapter 16 Advanced Data Structures
626
764
Chapter 17 Generic Programming
Java Concepts
Page 3 of 4
88980907.012.png 88980907.001.png 88980907.002.png 88980907.003.png
Java Concepts, 5th Edition
Chapter 18 Graphical User Interfaces
Java Concepts
Page 4 of 4
88980907.004.png 88980907.005.png 88980907.006.png 88980907.007.png
Java Concepts, 5th Edition
Chapter 1 Introduction
C HAPTER G OALS
ȗ To understand the activity of programming
ȗ To learn about the architecture of computers
ȗ To learn about machine code and high-level programming languages
ȗ To become familiar with your computing environment and your compiler
ȗ To compile and run your first Java program
ȗ To recognize syntax and logic errors
The purpose of this chapter is to familiarize you with the concept of programming. It
reviews the architecture of a computer and discusses the difference between machine
code and high-level programming languages. Finally, you will see how to compile
and run your first Java program, and how to diagnose errors that may occur when a
program is compiled or executed.
1.1 What Is Programming?
2
You have probably used a computer for work or fun. Many people use computers for
everyday tasks such as balancing a checkbook or writing a term paper. Computers are
good for such tasks. They can handle repetitive chores, such as totaling up numbers or
placing words on a page, without getting bored or exhausted. Computers also make
good game machines because they can play sequences of sounds and pictures,
involving the human user in the process.
The flexibility of a computer is quite an amazing phenomenon. The same machine can
balance your checkbook, print your term paper, and play a game. In contrast, other
machines carry out a much narrower range of tasksȌa car drives and a toaster toasts.
To achieve this flexibility, the computer must be programmed to perform each task. A
computer itself is a machine that stores data (numbers, words, pictures), interacts with
devices (the monitor screen, the sound system, the printer), and executes programs.
Chapter 1 Introduction
Page 1 of 43
88980907.008.png
Zgłoś jeśli naruszono regulamin