Java Programming (Mindtap Course List), 10Th Edition Joyce Farrell - Ebook PDF
Java Programming (Mindtap Course List), 10Th Edition Joyce Farrell - Ebook PDF
com
https://ebookluna.com/download/java-programming-mindtap-
course-list-10th-edition-ebook-pdf/
OR CLICK HERE
DOWLOAD NOW
https://ebookluna.com/download/java-programming-ebook-pdf/
ebookluna.com
https://ebookluna.com/download/programming-logic-design-
comprehensive-9th-edition-ebook-pdf/
ebookluna.com
https://ebookluna.com/download/programming-logic-and-design-
comprehensive-9th-edition-ebook-pdf/
ebookluna.com
https://ebookluna.com/download/introduction-to-java-programming-
comprehensive-version-ebook-pdf/
ebookluna.com
Physics for Scientists and Engineers (MindTap Course List)
10th Edition Serway - eBook PDF
https://ebookluna.com/download/physics-for-scientists-and-engineers-
mindtap-course-list-ebook-pdf/
ebookluna.com
https://ebookluna.com/download/business-law-text-exercises-mindtap-
course-list-ebook-pdf/
ebookluna.com
https://ebookluna.com/download/your-career-how-to-make-it-happen-
mindtap-course-list-ebook-pdf/
ebookluna.com
https://ebookluna.com/download/interpersonal-conflict-ebook-pdf/
ebookluna.com
https://ebookluna.com/product/ebook-pdf-murachs-java-programming-5th-
edition-by-joel-murach/
ebookluna.com
Java
Programming
Tenth Edition
Joyce Farrell
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
This is an electronic version of the print textbook. Due to electronic rights restrictions,
some third party content may be suppressed. Editorial review has deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require it. For
valuable information on pricing, previous editions, changes to current editions, and alternate
formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for
materials in your areas of interest.
Important Notice: Media content referenced within the product description or the product
text may not be available in the eBook version.
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
JavaTM Programming, Tenth Edition © 2023, © 2019, © 2016 Cengage Learning, Inc. WCN: 02-300
Joyce Farrell ALL RIGHTS RESERVED. No part of this work covered by the copyright herein
may be reproduced or distributed in any form or by any means, except as
SVP, Higher Education Product Management: Erin
permitted by U.S. copyright law, without the prior written permission of the
Joyner
copyright owner.
VP, Product Management, Learning Experiences: Unless otherwise noted, all content is Copyright © Cengage Learning, Inc.
Thais Alencar
Unless otherwise noted, all screenshots are courtesy of Microsoft Corporation.
Product Director: Mark Santee
Microsoft is a registered trademark of Microsoft Corporation in the U.S.
Associate Product Manager: Tran Pham and/or other countries.
The names of all products mentioned herein are used for identification
Product Assistant: Ethan Wheel
purposes only and may be trademarks or registered trademarks of their
Learning Designer: Mary Convertino respective owners. Cengage Learning disclaims any affiliation, association,
connection with, sponsorship, or endorsement by such owners.
Senior Content Manager: Maria Garguilo
Associate Digital Delivery Quality Partner: David For product information and technology assistance, contact us at
O’Connor Cengage Customer & Sales Support, 1-800-354-9706
or support.cengage.com.
Technical Editor: John Freitas
For permission to use material from this text or product, submit all
Developmental Editor: Dan Seiter
requests online at www.copyright.com.
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
BRIEF CONTENTS
PREFACEXI
GLOSSARY 625
INDEX 641
iii
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
CONTENTS
PREFACEXI Key Terms 32
Review Questions 33
CHAPTER 1 Programming Exercises 34
Debugging Exercises 36
CREATING JAVA PROGRAMS 1
Game Zone 36
1.1 Learning Programming Terminology 1 Case Problems 37
1.2 Comparing Procedural and Object-
Oriented Programming Concepts 4
CHAPTER 2
Procedural Programming 4
Object-Oriented Programming 5 USING DATA 39
Understanding Classes, Objects, and Encapsulation 6
2.1 Declaring and Using Constants
Understanding Inheritance and Polymorphism 7
and Variables 39
1.3 Features of the Java Programming Declaring Variables 40
Language8
Declaring Named Constants 42
1.4 Analyzing a Java Application That The Scope of Variables and Constants 43
Produces Console Output 10
Concatenating Strings to Variables and
Understanding the Statement That Produces the Constants 43
Output10
Pitfall: Forgetting That a Variable Holds One
Understanding the First Class 12 Value at a Time 45
Understanding the main() Method 14
2.2 Learning About Integer Data
Indent Style 15
Types47
Saving a Java Class 16
2.3 Using the boolean Data Type 51
1.5 Compiling a Java Class and
Correcting Syntax Errors 18 2.4 Learning About Floating-Point
Compiling a Java Class 18 Data Types 52
Correcting Syntax Errors 19 2.5 Using the char Data Type 53
1.6 Running a Java Application and 2.6 Using the Scanner Class to
Correcting Logic Errors 23 Accept Keyboard Input 57
Running a Java Application 23 Pitfall: Using nextLine() Following One of the
Modifying a Compiled Java Class 23 Other Scanner Input Methods 59
Correcting Logic Errors 24
2.7 Using the JOptionPane Class to
1.7 Adding Comments to a Java Class 25 Accept GUI Input 64
1.8 Creating a Java Application That Using Input Dialog Boxes 64
Produces GUI Output 27 Using Confirm Dialog Boxes 66
1.9 Finding Help 29 2.8 Performing Arithmetic Using
Variables and Constants 68
Don’t Do It 30 Associativity and Precedence 69
Summary31 Writing Arithmetic Statements Efficiently 69
iv
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents v
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
vi Contents
CHAPTER 5 CHAPTER 6
MAKING DECISIONS 161 LOOPING201
5.1 Planning Decision-Making Logic 161 6.1 Learning About the Loop
5.2 The if and if…else Statements 163 Structure201
The if Statement 163 6.2 Creating while Loops 202
Pitfall: Misplacing a Semicolon in an if Statement 164 Writing a Definite while Loop 202
Pitfall: Using the Assignment Operator Instead Pitfall: Failing to Alter the Loop Control Variable
of the Equivalency Operator 165 Within the Loop Body 204
Pitfall: Attempting to Compare Objects Using Pitfall: Unintentionally Creating a Loop with
the Relational Operators 165 an Empty Body 204
The if…else Statement 166 Altering a Definite Loop’s Control Variable 206
Writing an Indefinite while Loop 206
5.3 Using Multiple Statements in
if and if…else Clauses 168 Validating Data 208
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents vii
7.5 Learning About the StringBuilder 8.9 Using the Arrays Class 307
and StringBuffer Classes 253 8.10 Creating Enumerations 311
CHAPTER 8 CHAPTER 9
ARRAYS267 INHERITANCE AND INTERFACES 329
8.1 Declaring an Array 267 9.1 Learning About the Concept of
8.2 Initializing an Array 271 Inheritance329
Inheritance Terminology 331
8.3 Using Variable Subscripts with an
Array273 9.2 Extending Classes 332
Using the Enhanced for Loop 275 9.3 Overriding Superclass Methods 336
Using Part of an Array 275 Using the @Override Annotation 337
8.4 Declaring and Using Arrays 9.4 Calling Constructors During
of Objects 277 Inheritance339
Using the Enhanced for Loop with Objects 279 Using Superclass Constructors That Require
Manipulating Arrays of Strings 279 Arguments 340
8.5 Searching an Array and Using 9.5 Accessing Superclass Methods 344
Parallel Arrays 284 Comparing this and super 345
Using Parallel Arrays 284
9.6 Employing Information Hiding 346
Searching an Array for a Range Match 286
9.7 Methods You Cannot Override 348
8.6 Passing Arrays to and Returning
Arrays from Methods 289 A Subclass Cannot Override static Methods
in Its Superclass 348
Returning an Array from a Method 291
A Subclass Cannot Override final Methods
8.7 Sorting Array Elements 292 in Its Superclass 350
Using the Bubble Sort Algorithm 293 A Subclass Cannot Override Methods in a final
Improving Bubble Sort Efficiency 295 Superclass 351
Sorting Arrays of Objects 295 9.8 Creating and Using Abstract
Using the Insertion Sort Algorithm 296 Classes352
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
viii Contents
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents ix
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
x Contents
14.9 U
sing the JCheckBox, APPENDIX C
ButtonGroup, and JComboBox
Classes572 FORMATTING OUTPUT 595
The JCheckBox Class 572
The ButtonGroup Class 574 APPENDIX D
The JComboBox Class 575
GENERATING RANDOM
Don’t Do It 580 NUMBERS 603
Summary 581
Key Terms 581 APPENDIX E
Review Questions 582
JAVADOC 607
Programming Exercises 584
Debugging Exercises 585
Game Zone 585
APPENDIX F
Case Problems 586 USING JAVAFX AND SCENE
BUILDER613
APPENDIX A
GLOSSARY 625
WORKING WITH THE INDEX 641
JAVA PLATFORM 587
APPENDIX B
DATA REPRESENTATION 591
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
PREFACE
Java Programming, Tenth Edition provides the beginning programmer with a guide to developing applications
using the Java programming language. Java is popular among professional programmers because it is object-
oriented, making complex problems easier to solve than in some other languages. Java is used for desktop
computing, mobile computing, game development, Web development, and numerical computing.
This course assumes that you have little or no programming experience. It provides a solid background in
good object-oriented programming techniques and introduces terminology using clear, familiar language. The
programming examples are business examples; they do not assume a mathematical background beyond high
school business math. In addition, the examples illustrate only one or two major points; they do not contain so
many features that you become lost following irrelevant and extraneous details. Complete, working programs
appear frequently in each chapter; these examples help students make the transition from the theoretical
to the practical. The code presented in each chapter also can be downloaded from the Cengage website, so
students easily can run the programs and experiment with changes to them.
The student using Java Programming, Tenth Edition builds applications from the bottom up rather than
starting with existing objects. This facilitates a deeper understanding of the concepts used in object-oriented
programming and engenders appreciation for the existing objects students use as their knowledge of the
language advances. When students complete this course, they will know how to modify and create simple Java
programs, and they will have the tools to create more complex examples. They also will have a fundamental
knowledge of object-oriented programming, which will serve them well in advanced Java courses or in studying
other object-oriented languages such as C++, C#, and Visual Basic.
Chapters 5 and 6 explore input and repetition structures, which are the backbone of programming logic and
essential to creating useful programs in any language. You learn the special considerations of string and array
manipulation in Chapters 7 and 8.
Chapters 9 and 10 thoroughly cover inheritance, interfaces, and exception handling. Inheritance is the object-
oriented concept that allows you to develop new objects quickly by adapting the features of existing objects,
interfaces define common methods that must be implemented in all classes that use them, and exception
handling is the object-oriented approach to handling errors. All of these are important concepts in object-
oriented design. Chapter 11 provides information about handling files so you can store and retrieve program
output.
Chapter 12 explains recursion, and Chapter 13 covers Java collections and generics. Both are important
programming concepts, and Java provides excellent ways to implement and learn about them. Chapter 14
introduces GUI Swing components, which are used to create visually pleasing, user-friendly, interactive
applications.
xi
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xii Preface
❯❯Java help: Instructions on searching for Java help have been updated to avoid using specific URLs because new
Java versions are now being released twice a year.
❯❯Text blocks: Chapter 2 introduces text blocks—a new feature since Java 13.
❯❯Methods: Methods are covered thoroughly in Chapter 3, including topics such as overloading methods and
avoiding ambiguity. In previous editions, the material was split between chapters.
❯❯Classes and objects: Classes and objects are covered thoroughly in Chapter 4. In previous editions, the material
was split between chapters.
❯❯The switch expression: Chapter 5 includes the switch expression, which became a new feature in Java 14.
❯❯Arrays: Chapter 8 covers beginning and advanced array concepts. In previous editions, this content was split
between chapters.
❯❯Inheritance and interfaces: Chapter 9 covers inheritance and interfaces. In previous editions, this content was
split between chapters.
❯❯The record keyword: Chapter 9 also introduces the record keyword, which allows simple classes to be
developed more quickly because a constructor and methods to get and set fields are created automatically
based on field definitions.
❯❯Recursion: Chapter 12 is a new chapter on recursion. The chapter presents techniques to use to solve
mathematical problems, manipulate strings, and create visual patterns using recursion.
❯❯Collections and generics: Chapter 13 is a new chapter on collections and generics. The chapter covers the
Collection and List interfaces, the ArrayList and LinkedList classes, Iterators, and generic
classes and methods.
❯❯Objectives: Each chapter begins with a list of objectives so you know the topics that will be presented in the
chapter. In addition to providing a quick reference to topics covered, this feature provides a useful study aid.
❯❯You Do It: In each chapter, step-by-step exercises help students create multiple working programs that
emphasize the logic a programmer uses in choosing statements to include. These sections provide a means for
students to achieve success on their own—even those in online or distance learning classes.
❯❯Notes: These highlighted tips provide additional information—for example, an alternative method of performing
a procedure, another term for a concept, background information about a technique, or a common error to
avoid.
❯❯Emphasis on student research: The student frequently is advised to use the Web to investigate Java classes,
methods, and techniques. Computer languages evolve, and programming professionals must understand how to
find the latest language improvements.
❯❯Figures: Each chapter contains many figures. Code figures are most frequently 25 lines or fewer, illustrating one
concept at a time. Frequent screenshots show exactly how program output appears. Callouts appear where
needed to emphasize a point.
❯❯Color: The code figures in each chapter contain all Java keywords in blue. This helps students identify keywords
more easily, distinguishing them from programmer-selected names.
❯❯Files: More than 200 student files can be downloaded from the Cengage website. Most files contain the code
presented in the figures in each chapter; students can run the code for themselves, view the output, and make
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Preface xiii
changes to the code to observe the effects. Other files include debugging exercises that help students improve
their programming skills.
❯❯Two Truths & a Lie: A short quiz reviews almost every chapter section, with answers provided. This quiz
contains three statements based on the preceding section of text—two statements are true, and one is false.
Over the years, students have requested answers to problems, but we have hesitated to distribute them in case
instructors want to use problems as assignments or test questions. These true-false quizzes provide students
with immediate feedback as they read, without “giving away” answers to the multiple-choice questions and
programming exercises.
❯❯Don’t Do It: This section at the end of each chapter summarizes common mistakes and pitfalls that plague new
programmers while learning the current topic.
❯❯Summary: Following each chapter is a summary that recaps the programming concepts and techniques covered
in the chapter. This feature provides a concise means for students to check their understanding of the main
points in each chapter.
❯❯Key Terms: Each chapter includes a list of newly introduced vocabulary, shown in alphabetical order. The list of
key terms provides a short review of the major concepts in the chapter.
❯❯Review Questions: Each chapter includes 20 multiple-choice questions that serve as a review of chapter topics.
❯❯Programming Exercises: Multiple programming exercises are included with each chapter. These challenge
students to create complete Java programs that solve real-world problems.
❯❯Debugging Exercises: Four debugging exercises are included with each chapter. These are programs that
contain logic or syntax errors that the student must correct. Besides providing practice in deciphering error
messages and thinking about correct logic, these exercises provide examples of complete and useful Java
programs after the errors are repaired.
❯❯Game Zone: Each chapter provides one or more exercises in which students can create interactive games
using the programming techniques learned up to that point; 50 game programs are suggested in the course.
The games are fun to create and play; writing them motivates students to master the necessary programming
techniques. Students might exchange completed game programs with each other, suggesting improvements and
discovering alternate ways to accomplish tasks.
❯❯Cases: Each chapter contains two running case problems. These cases represent projects that continue to
grow throughout a semester using concepts learned in each new chapter. Two cases allow instructors to assign
different cases in alternate semesters or to divide students in a class into two case teams.
❯❯Glossary: A glossary contains definitions for all key terms in the course.
❯❯Appendices: This edition includes useful appendices on working with the Java platform, data representation,
formatting output, generating random numbers, creating Javadoc comments, and JavaFX.
❯❯Quality: Every program example, exercise, and game solution was tested by the author and then tested again by
a quality assurance team.
All MindTap activities and assignments are tied to defined unit learning objectives. MindTap provides the analytics and
reporting so you can easily see where the class stands in terms of progress, engagement, and completion rates. Use
Copyright 2023 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Other documents randomly have
different content
an implied assurance that they reflect historical situations. When
Toynbee compares civilizations with motor cars on a one-way street,
[17]
or with men resting or climbing on a mountainside, he conveys
the impression (which he himself judges correct) that a definite
direction, a forward or upward movement, is discernible in history.
But such dynamics are imputed, not observed. He writes:
This image (further elaborated in the book, and duly illustrated with a
picture in Time magazine) does a great deal more than tell us that
primitive societies are static and civilizations dynamic. The
dominating feature of the image is the rock cliff with its succession of
ledges and precipices. Where is the historical reality 14
corresponding to this scenery which exists independent of the
sleepers and climbers and determines their direction? The “one-way
street” likewise suggests a predetermined orientation and limitation
of cultural endeavour. Toynbee believes that there is a cliff to be
climbed, a street to be followed. Yet the truth is—in the terms of his
images—that we see figures at rest or on the move in a cloudy space
but know nothing about their relative position: we do not know which
ledge is above or below which other ledge. Or again: we see motor
cars moving, halting, or out of order. But we do not know whether
they move in an alley, or on a four-drive highway, on an open plain,
or within a circle—we do not even know whether there is an entrance
or exit at all.
It is, in fact, odd that Toynbee, who opens his work with an excellent
statement of the relativity of historical thought, who complains that
“a local and temporary standpoint has given our historians a false
perspective,” remains himself so completely under the spell of a 17
nineteenth-century western outlook. His evolutionary bias, his
empiricism, and his treatment of civilizations as “specimens of a
species” are all of a piece. He sometimes equals Spengler in myth-
making, treating his equation of civilizations and living beings as a
reality, and appealing to biological opinion to uphold a historical
[26]
conclusion. His use of “species” and “genus” obscures the
fundamental fact that science can study individuals as members of a
species only by ignoring their individual characteristics. The historian,
following this course, would defeat the very purpose of his work.
Reading this, one would not suspect that the five centuries following
the expulsion of the Hyksos are the most brilliant epoch of Egyptian
history. One would also not assume that after about one thousand
years of this “life-in-death,” religious texts glorifying Amon-Re were
written which in profundity of thought and literary splendour belong
to the greatest in Egyptian literature, and are its nearest approach to
[29]
the majestic monotheism of the Old Testament. Surely an
“empirical” approach would have started from the fact that Egyptian
civilization did actually retain its vitality over an unusually long period.
Toynbee, however, declares that the Egyptian achievements in the
second and first millennia B.C. are but illusions, for the scheme to
which he is committed (although it is alien, and hence irrelevant, to
Egyptian history) requires a “time of troubles” before the Middle
[30]
Kingdom which must be followed by a “universal church” 20
with its two types of proletariat. Thus the confessed
“empiricist” adheres to a preconceived system and disposes of the
facts by proclaiming the Hyksos period “a date when the process of
disintegration would otherwise have reached its natural term in
dissolution.” (The italics are mine.)
25
II. THE PREHISTORY OF THE ANCIENT NEAR
EAST
At the end of our last chapter we said that the study of the birth of a
civilization means watching the emergence of its “form.” We have
also seen that this “form” is elusive, that it is not a concrete mould,
or a standard which we can apply to our observations to see whether
they conform with it. We have described it as “a certain consistency
in orientation, a cultural style.” Recognizing it amounts to discovering
a point of view from where seemingly unrelated facts acquire
coherence and meaning. Even so the “form” of a civilization remains
intangible; it is implicit in the preoccupations and valuations of the
people. It imparts to their achievements—to their arts and
institutions, their literature, their theology—something distinct and
final, something which has its own peculiar perfection. Therefore a
discussion of the emergence of form entails a knowledge of a
civilization in its maturity, a familiarity with its classical expression in
every field. Then it should be possible to work backwards from
better-known to early times until the point is reached where the
familiar phenomena are lost sight of and where, conversely, their
[36]
emergence must be postulated.
At present the arable lands of Egypt and Western Asia are embedded
in large tracts of desert. But it seems that in the Ice Age the pressure
of cold air over Europe compelled the Atlantic rain storms to travel
east by a more southerly track so that the whole area from the west
coast of Africa to the Persian mountains was a continuous belt of
park and grassland. In Algeria and southern Tripolitania hunters of
the Old Stone Age engraved images of elephants, buffaloes, 27
and giraffes on rocks now surrounded for hundreds of miles by
an arid waste where life is utterly impossible. Paleolithic implements
have been found on the high desert which flanks the Nile valley, and
in Syria, Palestine, and Kurdistan. Carved tools found in Palestine
(Fig. 1, A, B) and the engravings from North Africa find close parallels
in the splendid engravings and paintings from the caves of southern
France and northern Spain.
In the second place, there are African parallels which suggest that
the earliest agriculture in the Nile valley and Mesopotamia could also
have proceeded without irrigation. The conditions in these river
valleys in antiquity resembled closely those found nowadays on the
Blue Nile, where semi-Hamitic nomads, the Hadendoa, sow and
harvest in the simple manner which we shall now describe. It is
possible, therefore, to postulate similar simple methods for the
prehistoric Egyptians. Burckhardt renders his observations in the Taka
country of Nubia as follows:
About the latter end of June ... large torrents coming from the
South and South-east pour over the country and in the space of a
few weeks cover the whole surface with a sheet of water, varying
in depth from two to three feet.... The waters, on subsiding, leave
a thick slime, or mud, upon the surface, similar to that left by the
Nile.... Immediately after the inundation is imbibed, the Beduins
sow the seed upon the alluvial mud, without any previous
preparation whatever. The inundation is usually accompanied by
heavy downpours. The rains last several weeks longer than the
inundation but they are not incessant, falling in heavy showers at
short intervals.
Other inventions, too, were known throughout the Near East in the
earliest settlements of the New Stone Age. Pottery-making is one of
them, weaving another. It is hardly to be wondered that we cannot
follow the first phases of their existence. If the earliest pots, for
instance, were only dried in the sun or lightly baked or were merely
clay-lined baskets, they cannot be expected to have survived. And it
may be considered exceptionally fortunate that of early textiles 36
[61]
a few scraps have survived for six or seven thousand years.
It is likewise only due to the refinements of modern excavation
technique that the oldest of the successive settlements of Hassuna,
near Mosul (Fig. 2), was recognized as a camp site, consisting of no
more than a number of hearths, still containing wood ashes. They
were made of “potsherds and pebbles set in a kind of primitive
[62]
cement” with pottery lying around them. Only in higher levels did
adobe walls appear. This single instance in which a very early
[63]
settlement was recognized explains why others remain unknown.
But we know that after (or during) the time of the Natufians these
important discoveries were made and diffused among villages
stretching from the Nile valley through the Delta and thence in a
great arch (Fig. 51) from Jericho in the south, via Byblos and Ras
Shamra on the Syrian coast to Mersin in Cilicia; then, through the
Amuq plain, east of Antioch, via Carchemish on the Euphrates to Tell
Halaf and Chagar Bazar in North Syria to Nineveh and Hassuna near
Mosul, and on eastwards, to Sialk near Kashan in central Persia.
In the valley, the annual flood of the Nile continuously changed the
lay of the land. When the water overflowed the river banks the silt,
previously kept in suspension by the speed of the swollen current,
precipitated. Some of this precipitation raised the river bed, the
remainder covered the banks and the area closest to them; towards
the edges of the valley there was comparatively little deposit. Thus
banks of considerable height were formed, and after some years the
weight of water broke through these natural dikes to seek a new
course in low-lying parts, some distance away. The old bed turned
into swamp, but its banks remained as ridges and hillocks whose
height and area were increased by wind-blown dust and silt caught at
their edges. Trees took root, and man settled there, sowing his crops
and grazing his beasts in the adjoining lowlands, to retire with them
to the high ground of the old banks when the river overflowed.
During the inundation, fish, wild boar, hippopotamus, and huge flocks
of water birds invaded the surrounding fields and supplied an
abundance of food throughout the summer.
The chiefs’ reed tents are more impressive; they are large tunnels of
matting covering a framework of reed bundles which form
semicircular arches. Doors and windows are arranged in the mats
closing either end. We know that such structures were also used in
the fourth millennium B.C., for they are represented, with all the
necessary detail, in the earliest renderings of sacred buildings,
notably the byres and folds of temple animals (Fig. 5).
And yet the Al Ubaid period has left us some remains which suggest
that certain centres began to be of outstanding importance and that
a change in the rural character of the settlements was taking place.
[84]
At Abu Shahrein in the south, and at Tepe Gawra in the 47
north, temples were erected. And these not only testify to a co-
ordinated effort on a larger scale than we would expect within the
scope of a village culture, but show also a number of features which
continue in historical times—for instance: the simple oblong shape of
the sanctuary, with its altar and offering table; the platforms on
which the temples were set; the strengthening buttresses (which
developed into a system of piers and recesses, rhythmically
articulating the walls). Moreover, it is likely that at Eridu there was
continuity, not only of architectural development, but of worship. In
the absence of inscriptions this contention cannot be proved. But the
god worshipped there in historical times was called Enki—lord of the
earth, but also god of the sweet waters. He is depicted surrounded
by waters (for he “had founded his chamber in the deep”) and fishes
sport in the streams which spring from his shoulders. Now an
observation made during the excavation of the Al Ubaid temples
suggests that the same god was adored in them. At one stage the
offering table and sanctuary were covered with a layer of fish bones
six inches deep, remains, no doubt, of an offering to the god of
whom it was said:
49
III. THE CITIES OF MESOPOTAMIA
The scene we have so far surveyed has been somewhat monotonous.
The differences between the various groups of prehistoric farmers are
insignificant beside the overriding similarity of their mode of life,
relatively isolated as they were and almost entirely self-sufficient in
their small villages. But by the middle of the fourth millennium B.C.
this picture changed, first in Mesopotamia and a little later in Egypt;
and the change may be described in terms of archaeological
evidence. In Mesopotamia we find a considerable increase in the size
of settlements and buildings such as temples. For the first time we
can properly speak of monumental architecture as a dominant
feature of sizable cities. In Egypt, too, monumental architecture
appeared; and in both countries writing was introduced, new
techniques were mastered, and representational art—as distinct from
the mainly decorative art of the preceding period—made its first
appearance.
The evidence from Egypt, which is the more extensive, indicates the
transition was neither slow nor gradual. It is true that towards the
end of the prehistoric period certain innovations heralded the coming
age. But when the change occurred it had the character of a 51
crisis, affecting every aspect of life at once but passing within
the space of a few generations. Then followed—from the middle of
the First until the end of the Third Dynasty—a period of consolidation
and experiment, and with this the formative phase of Egyptian
civilization was concluded. Few things that mattered in Pharaonic
Egypt were without roots in that first great age of creativity.