100% found this document useful (8 votes)
38 views

Full Java Programming (MindTap Course List), 10th Edition Joyce Farrell - Ebook PDF PDF All Chapters

Course

Uploaded by

gusticajab
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (8 votes)
38 views

Full Java Programming (MindTap Course List), 10th Edition Joyce Farrell - Ebook PDF PDF All Chapters

Course

Uploaded by

gusticajab
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Download the full version of the ebook now at ebooksecure.

com

Java Programming (MindTap Course List), 10th


Edition Joyce Farrell - eBook PDF

https://ebooksecure.com/download/java-programming-
mindtap-course-list-10th-edition-ebook-pdf/

Explore and download more ebook at https://ebooksecure.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Java Programming 9th Edition Joyce Farrell - eBook PDF

https://ebooksecure.com/download/java-programming-ebook-pdf/

ebooksecure.com

Programming Logic & Design, Comprehensive 9th edition


Joyce Farrell - eBook PDF

https://ebooksecure.com/download/programming-logic-design-
comprehensive-9th-edition-ebook-pdf/

ebooksecure.com

Programming Logic and Design, Comprehensive 9th Edition


Joyce Farrell - eBook PDF

https://ebooksecure.com/download/programming-logic-and-design-
comprehensive-9th-edition-ebook-pdf/

ebooksecure.com

(eBook PDF) Management across Cultures - Australasian


Edition

https://ebooksecure.com/product/ebook-pdf-management-across-cultures-
australasian-edition/

ebooksecure.com
Statistics for Business & Economics 14e Edition David R.
Anderson - eBook PDF

https://ebooksecure.com/download/statistics-for-business-economics-
ebook-pdf-2/

ebooksecure.com

(Original PDF) Fundamentals of Human Resource Management


5th by Gary Dessler

https://ebooksecure.com/product/original-pdf-fundamentals-of-human-
resource-management-5th-by-gary-dessler/

ebooksecure.com

(eBook PDF) Data Analytics for Accounting 2nd Edition By


Vernon Richardson

https://ebooksecure.com/product/ebook-pdf-data-analytics-for-
accounting-2nd-edition-by-vernon-richardson/

ebooksecure.com

(eBook PDF) Principles of International Taxation 6th


Edition

https://ebooksecure.com/product/ebook-pdf-principles-of-international-
taxation-6th-edition/

ebooksecure.com

Business Ethics: Cases, Issues & Stakeholders (Textbook)


13th Edition Sharon Hanna-West - eBook PDF

https://ebooksecure.com/download/business-ethics-cases-issues-
stakeholders-textbook-ebook-pdf/

ebooksecure.com
(eBook PDF) Applied Predictive Modeling 2nd 2018 Edition

https://ebooksecure.com/product/ebook-pdf-applied-predictive-
modeling-2nd-2018-edition/

ebooksecure.com
Java
Programming
Tenth Edition

Joyce Farrell

Australia • Brazil • Canada • Mexico • Singapore • United Kingdom • United States

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.

VP, Product Marketing: Jason Sakos


Library of Congress Control Number: 2021925780
Director, Product Marketing: April Danaë
ISBN: 978-0-357-67342-3
Portfolio Marketing Manager: Mackenzie Paine
Cengage
IP Analyst: Ann Hoffman
200 Pier 4 Boulevard
IP Project Manager: Integra Software Services Boston, MA 02210
USA
Production Service: Straive
Cengage is a leading provider of customized learning solutions with
Senior Designer: Erin Griffin employees residing in nearly 40 different countries and sales in more than
125 countries around the world. Find your local representative at
Cover Image Source: iStock.com/gremlin
www.cengage.com.

To learn more about Cengage platforms and services, register or access


your online learning solution, or purchase materials for your course, visit
www.cengage.com.

Notice to the Reader


Publisher does not warrant or guarantee any of the products described herein or perform any independent analysis in connection with
any of the product information contained herein. Publisher does not assume, and expressly disclaims, any obligation to obtain and
include information other than that provided to it by the manufacturer. The reader is expressly warned to consider and adopt all safety
precautions that might be indicated by the activities described herein and to avoid all potential hazards. By following the instructions
contained herein, the reader willingly assumes all risks in connection with such instructions. The publisher makes no representations
or warranties of any kind, including but not limited to, the warranties of fitness for particular purpose or merchantability, nor are any
such representations implied with respect to the material set forth herein, and the publisher takes no responsibility with respect to
such material. The publisher shall not be liable for any special, consequential, or exemplary damages resulting, in whole or part, from
the readers’ use of, or reliance upon, this material.

Printed in the United States of America


Print Number: 01   Print Year: 2022

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

CHAPTER 1 Creating Java Programs�������������������������������������������������������������������������������� 1


CHAPTER 2 Using Data���������������������������������������������������������������������������������������������������� 39
CHAPTER 3 Using Methods�������������������������������������������������������������������������������������������� 83
CHAPTER 4 Using Classes and Objects����������������������������������������������������������������������� 115
CHAPTER 5 Making Decisions�������������������������������������������������������������������������������������� 161
CHAPTER 6 Looping������������������������������������������������������������������������������������������������������� 201
CHAPTER 7 Characters, Strings, and the StringBuilder�������������������������������������� 237
CHAPTER 8 Arrays��������������������������������������������������������������������������������������������������������� 267
CHAPTER 9 Inheritance and Interfaces����������������������������������������������������������������������� 329
CHAPTER 10 Exception Handling��������������������������������������������������������������������������������� 393
CHAPTER 11 File Input and Output����������������������������������������������������������������������������� 441
CHAPTER 12 Recursion������������������������������������������������������������������������������������������������� 487
CHAPTER 13 Collections and Generics����������������������������������������������������������������������� 511
CHAPTER 14 Introduction to Swing Components���������������������������������������������������� 545
APPENDIX A Working with the Java Platform ����������������������������������������������������������� 587

APPENDIX B Data Representation ����������������������������������������������������������������������������� 591

APPENDIX C Formatting Output �������������������������������������������������������������������������������� 595

APPENDIX D Generating Random Numbers ������������������������������������������������������������ 603

APPENDIX E Javadoc ���������������������������������������������������������������������������������������������������� 607

APPENDIX F Using JavaFX and Scene Builder ����������������������������������������������������������� 613

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

Pitfall: Not Understanding Imprecision in Game Zone 113


Floating-Point Numbers 70 Case Problems 114
2.9 Understanding Type Conversion 72
Automatic Type Conversion 73 CHAPTER 4
Explicit Type Conversion 73
USING CLASSES AND OBJECTS 115
Don’t Do It 76 4.1 Learning About Classes
Summary 77 and Objects 115
Key Terms 77 4.2 Creating a Class 117
Review Questions 78
Programming Exercises 80
4.3 Creating Instance Methods
in a Class 119
Debugging Exercises 81
Game Zone 81 4.4 Declaring Objects and
Case Problems 82 Using Their Methods 124
Understanding Data Hiding 126

CHAPTER 3 4.5 Understanding That Classes


Are Data Types 128
USING METHODS 83 4.6 Creating and Using Constructors 131
3.1 Understanding Method Calls and Creating Constructors with Parameters 132
Placement83
4.7 Learning About the this
3.2 Understanding Method Reference134
Construction86 Using the this Reference to Make
Access Specifiers 86 Overloaded Constructors More Efficient 137
The static Modifier 87
4.8 Using static Fields 139
Return Type 87
Using Constant Fields 140
Method Name 87
Parentheses 88 4.9 Using Imported, Prewritten
Constants and Methods 143
3.3 Adding Parameters to Methods 91
The Math Class 144
Creating a Method That Receives a Single
Importing Classes That Are Not Imported
Parameter 91
Automatically 145
Creating a Method That Requires Multiple
Using the LocalDate Class 146
Parameters 94

3.4 Creating Methods That 4.10 U


 nderstanding Composition
Return Values 95 and Nested Classes 150
Composition 150
3.5 Understanding Blocks and Scope 99
Nested Classes 151
3.6 Overloading a Method 104
3.7 Learning about Ambiguity 107 Don’t Do It 153
Summary 153
Don’t Do It 108 Key Terms 154
Summary 108 Review Questions 154
Key Terms 109 Programming Exercises 156
Review Questions 109 Debugging Exercises 158
Programming Exercises 111 Game Zone 158
Debugging Exercises 113 Case Problems 159

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

5.4 Nesting if and if…else 6.3 Using Shortcut Arithmetic


Statements172 Operators210
5.5 Using Logical AND and OR 6.4 Creating a for Loop 214
Operators174 Variations in for Loops 215
The AND Operator 174 6.5 Learning How and When to Use
The OR Operator 175 a do…while Loop 217
Short-Circuit Evaluation 175 6.6 Learning About Nested Loops 220
5.6 Making Accurate and Efficient 6.7 Improving Loop Performance 223
Decisions178 Avoiding Unnecessary Operations 223
Making Accurate Range Checks 178 Considering the Order of Evaluation of
Making Efficient Range Checks 180 Short-Circuit Operators 224
Using && and || Appropriately 180 Comparing to Zero 224
5.7 Using switch  181 Employing Loop Fusion 226
Using the switch Expression 183 A Final Note on Improving Loop Performance 226

5.8 Using the Conditional and NOT


Operators186 Don’t Do It 228
Summary 228
Using the NOT Operator 187
Key Terms 229
5.9 Understanding Operator
Review Questions 229
Precedence187
Programming Exercises 232
5.10 M
 aking Constructors More Debugging Exercises 233
Efficient by Using Decisions in
Game Zone 234
Other Methods 189
Case Problems 235

Don’t Do It 193


Summary 193 CHAPTER 7
Key Terms 194
CHARACTERS, STRINGS, AND
Review Questions 194
THE StringBuilder 237
Programming Exercises 197
Debugging Exercises 198 7.1 Understanding String Data
Game Zone 199
Problems237
Case Problems 200 7.2 Using Character Class Methods 238

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.3 Declaring and Comparing 8.8 Using Two-Dimensional and Other


String Objects 241 Multidimensional Arrays 300
Comparing String Values 241 Passing a Two-Dimensional Array to a Method 302
Empty and null Strings 245 Using the length Field with a Two-Dimensional
Array303
7.4 Using a Variety of String
Methods246 Understanding Jagged Arrays 304
Using Other Multidimensional Arrays 304
Converting String Objects to Numbers 249

7.5 Learning About the StringBuilder 8.9 Using the Arrays Class 307
and StringBuffer Classes 253 8.10 Creating Enumerations 311

Don’t Do It 257 Don’t Do It 316


Summary 258 Summary 317
Key Terms 258 Key Terms 318
Review Questions 258 Review Questions 318
Programming Exercises 260 Programming Exercises 320
Debugging Exercises 262 Debugging Exercises 323
Game Zone 263 Game Zone 323
Case Problems 264 Case Problems 327

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

9.9 Using Dynamic Method Binding 359 10.7 T


 racing Exceptions Through the
Using a Superclass as a Method Parameter Type 360 Call Stack 415
9.10 C
 reating Arrays of Subclass 10.8 C
 reating Your Own Exception
Objects361 Classes419
9.11 U
 sing the Object Class and Its 10.9 Using Assertions 421
Methods364 10.10 Displaying the Virtual Keyboard 430
Using the toString() Method 364
Using the equals() Method 366 Don’t Do It 433
Overloading equals() 367 Summary 434
Overriding equals() 369 Key Terms 434
9.12 Creating and Using Interfaces 371 Review Questions 435
Creating Interfaces to Store Related Constants 374 Programming Exercises 437
Debugging Exercises 439
9.13 U
 sing records, Anonymous Inner
Classes, and Lambda Expressions 377 Game Zone 439

Using records 377 Case Problems 440

Using Anonymous Inner Classes 379


Using Lambda Expressions 380 CHAPTER 11
FILE INPUT AND OUTPUT 441
Don’t Do It 381
Summary 381
11.1 Understanding Computer Files 441
Key Terms 383 11.2 U
 sing the Path and Files
Review Questions 383 Classes443
Programming Exercises 385 Creating a Path 443
Debugging Exercises 389 Retrieving Information About a Path 444
Game Zone 390 Converting a Relative Path to an Absolute One 445
Case Problems 391 Checking File Accessibility 446
Deleting a Path 447
Determining File Attributes 448
CHAPTER 10
11.3 F
 ile Organization, Streams, and
EXCEPTION HANDLING 393 Buffers450
10.1 Learning About Exceptions 393 11.4 Using Java’s IO Classes 452
10.2 T
 rying Code and Catching Writing to a File 454
Exceptions397 Reading from a File 454
Using a try Block to Make Programs “Foolproof” 400 11.5 C
 reating and Using Sequential
Declaring and Initializing Variables in try…catch Data Files 457
Blocks 402
11.6 L
 earning About Random Access
10.3 T
 hrowing and Catching Multiple Files461
Exceptions404
11.7 W
 riting Records to a Random
10.4 Using the finally Block 408 Access Data File 463
10.5 U
 nderstanding the Advantages 11.8 R
 eading Records from a Random
of Exception Handling 410 Access Data File 468
10.6 S
 pecifying the Exceptions That Accessing a Random Access File Sequentially 468
a Method Can Throw 412 Accessing a Random Access File Randomly 470

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.
Visit https://testbankfan.com
now to explore a rich
collection of testbank or
solution manual and enjoy
exciting offers!
Contents ix

Don’t Do It 479 13.4 Using the LinkedList Class 524


Summary 479
13.5 Using Iterators 528
Key Terms 480
Review Questions 480
13.6 Creating Generic Classes 530
Programming Exercises 482 13.7 Creating Generic Methods 532
Debugging Exercises 484 Creating a Generic Method with More than One
Game Zone 484 Type Parameter 533

Case Problems 485


Don’t Do It 537

CHAPTER 12 Summary 538


Key Terms 538
RECURSION487 Review Questions 539

12.1 Understanding Recursion 487 Programming Exercises 541


Debugging Exercises 542
12.2 U
 sing Recursion to Solve
Game Zone 542
Mathematical Problems 489
Case Problems 543
Computing Sums 490
Computing Factorials 491
12.3 U
 sing Recursion to Manipulate CHAPTER 14
Strings495
INTRODUCTION TO Swing
Using Recursion to Separate a Phrase into Words 495
Using Recursion to Reverse the Characters in a
COMPONENTS545
String 496 14.1 U
 nderstanding Swing
12.4 U
 sing Recursion to Create Visual Components545
Patterns499 14.2 Using the JFrame Class 547
12.5 R
 ecursion’s Relationship to Customizing a JFrame’s Appearance 549
Iterative Programming 500 14.3 Using the JLabel Class 552
Changing a JLabel’s Font 553
Don’t Do It 503
14.4 Using a Layout Manager 555
Summary 503
Key Terms 504 14.5 Extending the JFrame Class 557
Review Questions 504 14.6 A
 dding JTextFields and
Programming Exercises 506 JButtons to a JFrame 559
Debugging Exercises 508 Adding JTextFields to a JFrame 559
Game Zone 509 Adding JButtons to a JFrame 560
Case Problems 510 14.7 L
 earning About Event-Driven
Programming563
CHAPTER 13 Preparing Your Class to Accept Event Messages 564
Telling Your Class to Expect Events to Happen 564
COLLECTIONS AND GENERICS 511 Telling Your Class How to Respond to Events 564
13.1 U
 nderstanding the Collection Writing an Event-Driven Program 565
Interface511 Using Multiple Event Sources 566
13.2 U
 nderstanding the List Using the setEnabled() Method 567
Interface513
14.8 U
 nderstanding Swing Event
13.3 Using the ArrayList Class 514 Listeners569

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.

Organization and Coverage


Java Programming, Tenth Edition presents Java programming concepts, enforcing good style, logical thinking,
and the object-oriented paradigm. Objects are covered right from the beginning, earlier than in many other
Java courses. You create your first Java program in Chapter 1. Chapters 2, 3, and 4 increase your understanding
about how data, classes, objects, and methods interact in an object-oriented environment.

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

New in This Edition


The following features are new for the Tenth Edition:

❯❯Java: All programs have been tested using Java 16.

❯❯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.

Additionally, Java Programming, Tenth Edition includes the following features:

❯❯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.

MindTap Instructor Resources


MindTap activities for Java Programming, Tenth Edition are designed to help students master the skills they need in
today’s workforce. Research shows employers need critical thinkers, troubleshooters, and creative problem-solvers
to stay relevant in our fast-paced, technology-driven world. MindTap helps you achieve this with assignments and
activities that provide hands-on practice and real-life relevance. Students are guided through assignments that help
them master basic knowledge and understanding before moving on to more challenging problems.

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.
Exploring the Variety of Random
Documents with Different Content
tenants or good slaves no doubt induced landlords to entrust farms
to men who could and would work them profitably, whether freemen
or slaves. And a slave had in agriculture, as in trades and finance, a
point in his favour: his person and his goods[1494] remained in his
master’s power. If by skilled and honest management he relieved his
master of trouble and worry, and contributed by regular payment of
rent to assure his income, it was reasonable to look for gratitude
expressed, on the usual Roman lines, in his master’s will.
Manumission, perhaps accompanied by bequest[1495] of the very
farm that he had worked so well, was a probable reward. May we
not guess that some of the best farming carried on in Italy under the
earlier Empire was achieved by trusted slaves, in whom servile
apathy was overcome by hope? Such a farmer-slave would surely
have under him[1496] slave labourers, the property of his master;
and he would have the strongest possible motives for tact and skill
in their management, while his own capacity had been developed by
practical experience. I can point to no arrangement in Roman
agriculture so calculated to make it efficient on a basis of slavery as
this.
The services (operae) of a slave, due to his owner or to some one
in place of his owner, were a property capable of valuation, and
therefore could be let and hired at a price. That is, the person to
whom they were due could commute[1497] them for a merces. This
might, as in the corresponding Greek case of ἀποφορά, be a paying
business, if a slave had been bought cheap and trained so as to earn
good wages. It was common enough in various trades: what
concerns us is that the plan was evidently in use in the rustic world
also. Now this is notable. We naturally ask, if the man’s services
were worth so much to the hirer, why should they not have been
worth as much (or even a little more) to his own master? Why
should it pay to let him rather than to use him yourself? Of course
the owner might have more slaves than he needed at the moment:
or the hirer might be led by temporary need of labour to offer a
fancy price for the accommodation: or two masters on neighbouring
farms might engage in a reciprocity of cross-hirings to suit their
mutual convenience at certain seasons. Further possibilities might be
suggested, but are such occasional explanations sufficient to account
for the prevalence of this hiring-system? I think not. Surely the
principal influence, steadily operating in this direction, was one that
implied an admission of the economic failure of slavery. If A’s slave
worked for B so well that it paid A to let him do so and to receive a
rent for his services, it follows that the slave had some inducement
to exert his powers more fully as B’s hireling than in the course of
ordinary duty under his own master. Either the nature and conditions
of the work under B were pleasanter, or he received something for
himself over and above the stipulated sum claimed by his master. In
other words, as a mere slave he did not do his best: as a hired man
he felt some of the stimulus that a free man gets from the prospect
of his wage. So Slavery, already philanthropically questioned, was in
this confession economically condemned.
These points considered, we are not surprised to find mention of
slaves letting out their own[1498] operae. This must imply the
consent of their masters, and it is perhaps not rash to see in such a
situation a sign of weakening in the effective authority of masters. A
master whose interest is bound up with the fullest development of
his slave’s powers (as rentable property exposed to competition) will
hardly act the martinet without forecasting the possible damage to
his own pocket. A slave who knows that his master draws an income
from his efficiency is in a strong position for gradually extorting
privileges till he attains no small degree of independence. We may
perhaps find traces of such an advance in the arrangement by which
a slave hires his own operae[1499] from his master. He will thus
make a profit out of hiring himself: in fact he is openly declaring that
he will not work at full power for his master, but only compound with
him for output on the scale of an ordinary slave. This arrangement
was common in arts and handicrafts, and not specially characteristic
of Rome. In rustic life, the slave put into a farm as tenant[1500] at a
fixed rent, and taking profit and loss, may furnish an instance.
Whether such cases were frequent we do not know. The general
impression left by the Digest passages on hiring and letting of slaves
is that, when we read of mercennarii, it is generally if not always
hireling[1501] slaves, not free wage-earners, that are meant. In a
passage[1502] where servus occurs as well as mercennarius, it is
reference to the owner as well as to the hirer that necessitates the
addition. If I have interpreted these points aright, the picture
suggested is a state of things in which the rustic slave was steadily
improving his position, supplying hired labour, at times entrusted
with the charge of a farm, and with a fair prospect of becoming by
manumission under his owner’s will a free colonus, or even his own
landlord. How far this picture is really characteristic of rustic Italy, or
of the Provinces (such as Gaul or Spain), is what one would like to
know, but I can find no evidence.
In the foregoing paragraphs I have refrained from inquiring
whether the colonus as he appears in the Digest was a farmer who
worked with his own hands, or merely an employer and director of
labour. The reason is that I have found in the texts no evidence
whatever on the point. It was not the jurist’s business. We are left to
guess at the truth as best we may, and we can only start from
consideration of the farmer’s own interest, and assume that the
average farmer knew his own interest and was guided thereby. Now,
being bound to pay rent in some form or other and to make good
any deficiencies in the instrumentum at the end of his tenancy, he
had every inducement to get all he could out of the land while he
held it. How best to do this, was his problem. And the answer no
doubt varied according to the size of the farm, the kind of crops that
could profitably be raised there, and the number and quality of the
staff. In some rough operations, his constant presence on one spot
and sharing the actual work might get the most out of his men.
Where nicety of skill was the main thing, he might better spend his
time in direction and minute watching of the hands. On a fairly large
farm he would have enough to do as director. We may reasonably
guess that he only toiled with his own hands if he thought it would
pay him to do so. This a priori guesswork is not satisfactory. But I
see nothing else to be said; for the African inscriptions do not help
us. The circumstances of those great domains were exceptional.
So far we have been viewing agriculture as proceeding in times
and under conditions assumed to be more or less normal, without
taking account of the various disturbing elements in rustic life, by
which both landlords and tenants were liable to suffer vexation and
loss. Yet these were not a few. Even a lawyer could not ignore wild
beasts. Wolves carried off some of A’s pigs. Dogs kept by B, colonus
of a neighbouring villa, for protection of his own flocks, rescued the
pigs. A legal question[1503] at once arises: are the rescued pigs
regarded as wild game, and therefore belonging to the owner of the
dogs? No, says the jurist. They were still within reach; A had not
given them up for lost; if B tries to retain them, the law provides
remedies to make him give them up. I presume that B would have a
claim to some reward for his services. But the lawyer is silent,
confining his opinion to the one question of property. References to
depredations of robbers or brigands (latrones, grassatores,) occur
often, and quite as a matter of course. The police of rural Italy, not
to mention the Provinces, was an old scandal. Stock-thieves, who
lifted a farmer’s cattle sheep or goats, and sometimes his crops,
were important enough to have a descriptive name (abigei)[1504]
and a title of the Digest to themselves. That bad neighbours made
themselves unpleasant in many ways, and that their presence gave a
bad name to properties near them, was an experience of all lands
and all ages: but the jurists treat it gravely[1505] as a lawyer’s
matter. Concealment of such a detrimental fact[1506] by the seller of
an estate made the sale voidable. The rich (old offenders in this
kind) were by a rescript of Hadrian[1507] awarded differential
punishment for removing landmarks: in their case the purpose of
encroachment was not a matter open to doubt.
In one connexion the use of force as an embarrassing feature of
rustic life was a subject of peculiar interest to the jurists, and had
long been so. This was in relation to questions of possession. In
Roman law possessio held a very important place. All that need be
said of it here is that the fact of possession, or lack of it, seriously
affected the position of litigants in disputes as to property. Great
ingenuity was exercised in definition and in laying down rules for
ascertaining the fact. Now among the means employed in gaining or
recovering possession none was more striking or more effective than
the use of force. Special legal remedies had been provided to deal
with such violence; interdicta issued by the praetor, to forbid it, or to
reinstate a claimant dislodged by his rival, or simply to state the
exact issue raised in a particular case. On conformity or
disobedience to the praetor’s order the case was formally tried in
court: the question of law mainly turned on questions of fact. What
concerns us is that force was solemnly classified under two heads,
vis and vis armata. Each of these had its own proper interdict at
least as early as the time of Cicero, and they occupy a whole
title[1508] in the Digest. Clearly the use of force was no negligible
matter. That it was a danger or at least a nuisance to owners or
claimants of property, is not less clear. But how did it touch the
colonus? He was, as such, neither owner nor claimant of the
property of his farm. He had in his own capacity[1509] no possession
either. But, as tenant of a particular owner, his presence
operated[1510] to secure the possession of his landlord. Hence to
oust him by force broke the landlord’s possession; whether rightly or
wrongly, the law had to decide. Now it is obvious that, in cases
where serious affrays resulted from intrusion, a tenant might suffer
grave damage to his goods and person. The intruders (often a gang
of slaves) would seldom be so punctiliously gentle as to do no harm
at all. Therefore, having regard to the amount of interest in this
subject shewn by the lawyers, we cannot omit the use of force in
matters of possession from the list of rustic embarrassments.
Another cause of annoyance was connected with servitudes, such
as rights of way and water, which were frequent subjects of dispute
in country districts. Whether regarded as rights or as burdens, the
principles governing them were a topic that engaged the minute and
laborious attention[1511] of the lawyers. Now it is evident that a right
of way or water through an estate, though a material advantage to a
neighbouring estate served by the convenience, might be a material
disadvantage to the one over which the right extended. Also that the
annoyance might be indefinitely increased or lessened by the
cantankerous or considerate user of the right by the person or
persons enjoying it. When we consider that servitudes were already
an important department of jurisprudence in Republican days, and
see how great a space they occupy in the Digest, we can hardly
resist the conclusion that country proprietors found in them a fertile
subject of quarrels. But surely the quarrels of landlords over a
matter of this kind could not be carried on without occasional and
perhaps frequent disturbances and injury to the tenants on the land.
Even if the law provided means of getting compensation for any
damage done to a tenant’s crops or other goods in the course of
attempts to enforce or defeat a claimed servitude, was the average
colonus a man readily to seek compensation in the law-courts? I
think not. But, if not, he would depend solely on the goodwill of his
own landlord, supposing the latter to have got the upper hand in the
main dispute. On the whole, I strongly suspect that in practice these
quarrels over rustic servitudes were a greater nuisance to farmers
than might be supposed. So far as I know, we have no statement of
the farmer’s point of view. Another intermittent but damaging
occurrence was the occasional passage of soldiery, whose discipline
was often lax. We might easily forget the depredations and general
misconduct of these unruly ruffians, and imagine that such
annoyances only became noticeable in a later period. But the jurists
do not allow us to forget[1512] the military requisitions for supply of
troops on the march, the payment for which is not clearly provided,
and would at best be a cause of trouble; or the pilferings of the
men, compensation for which was probably not to be had. It would
be farmers in northern Italy and the frontier-provinces that were the
chief sufferers.
Damage by natural disturbances or by fires may happen in any
age or country. That Italy in particular was exposed to the effect of
floods and earthquakes, we know. Accordingly the lawyers are
seriously concerned with the legal and equitable questions arising
out of such events. It was not merely the claim of tenants[1513] to
abatement of rent that called for a statement of principles. Beside
the sudden effects of earthquakes torrents or fires, there were the
slower processes of streams changing their courses[1514] and
gradual land-slides on the slopes of hills. These movements
generally affected the proprietary relations of neighbouring
landlords, taking away land from one, sometimes giving to another.
Here was a fine opening for ingenious jurists, of which they took full
advantage. The growth of estates by alluvion, and loss by erosion,
was a favourite topic, the operation of which, and the questions
thereby raised, are so earnestly treated as to shew their great
importance in country life. Of fire-damage, due to malice or neglect,
no more need be said; nor of many other minor matters.
But, when all the above drawbacks have been allowed for, it is still
probably true that scarcity of labour was a far greater difficulty for
farmers. We hear very little directly of this trouble, as it raised no
point of law. Very significant[1515] however are the attempts of the
Senate and certain emperors to put down an inveterate scandal
which is surely good indirect evidence of the scarcity. It consisted in
the harbouring[1516] of runaway slaves on the estates of other
landlords. A runaway from one estate was of course not protected
and fed on another estate from motives of philanthropy. The slave
would be well aware that severe punishment awaited him if
recovered by his owner, and therefore be willing to work for a new
master who might, if displeased, surrender him any day. The
landlords guilty of this treason to the interests of their class were
probably the same as those who harboured[1517] brigands, another
practice injurious to peaceful agriculture both in Italy and abroad.
Another inconvenience, affecting all trades and all parts of the
empire in various degrees, was the local difference in the money-
value[1518] of commodities in different markets. This was sometimes
great: and that it was troublesome to farmers may be inferred from
the particular mention of wine oil and corn as cases in point. No
doubt dealers had the advantage over producers, as they generally
have, through possessing a more than local knowledge of necessary
facts. These middlemen however could not be dispensed with, as
experience shewed, and one of the later jurists[1519] openly
recognized. Facilities for borrowing, and rates of interest, varied
greatly in various centres. But all these market questions do not
seem to have been so acute as to be a public danger until the
ruinous debasement of the currency in the time of Gallienus. A few
references may be found to peculiar usages of country life in
particular Provinces. Thus we read that in Arabia[1520] farms were
sometimes ‘boycotted,’ any person cultivating such a farm being
threatened with assassination. In Egypt[1521] special care had to be
taken to protect the dykes regulating the distribution of Nile water.
Both these offences were summarily dealt with by the provincial
governor, and the penalty was death. Here we have one more proof
of the anxiety of the imperial government to insure the greatest
possible production of food. The empire was always hungry,—and so
were the barbarians. And the northern frontier provinces could not
feed both themselves and the armies.
While speaking of landlords and tenants we must not forget that
all over the empire considerable areas of land were owned by
municipalities, and dealt with at the discretion of the local
authorities. Variety of systems was no doubt dictated by variety of
local circumstances: but one characteristic was so general as to
deserve special attention on the part of jurists. This was the system
of perpetual leaseholds[1522] at a fixed (and undoubtedly beneficial)
rent, heritable and transferable to assigns. So long as the tenant
regularly paid the vectigal, his occupation was not to be disturbed. It
was evidently the desire of the municipal authorities to have a
certain income to reckon with: for the sake of certainty they would
put up with something less than a rack-rent. There were also other
lands owned by these civitates that were let on the system[1523] in
use by private landlords; the normal term probably being five years.
Of these no more need be said here. Beneficial leases under a
municipality were liable to corrupt management. It had been found
necessary[1524] to disqualify members of the local Senate
(decuriones) from holding such leases, that they might not share out
the common lands among themselves on beneficial terms. But this
prohibition was not enough. The town worthies put in men of
straw[1525] as nominal tenants, through whom they enjoyed the
benefits of the leases. So this evasion also had to be met by
revoking the ill-gotten privilege. But disturbance of tenancies was
not to be lightly allowed, so it appears that a reference to the
emperor[1526] was necessary before such revocation could take
place. This system of perpetual leases is of interest, not as indicating
different methods of cultivation from those practised on private
estates, but as betraying a tendency to fixity[1527] already existing,
destined to spread and to take other forms, and to become the fatal
characteristic of the later Empire. Another striking piece of evidence
in the same direction occurs in connexion with the lessees
(publicani) of various state dues (vectigalia publica) farmed out in
the usual way. In the first half of the third century the jurist Paulus
attests[1528] the fact that, in case it was found that the right of
collecting such dues, hitherto very profitable to the lessees, could
only be let at a lower lump sum than hitherto, the old lessees were
held bound to continue their contract at the old price. But
Callistratus, contemporary or nearly so, tells us that this was not so,
and quotes[1529] a rescript of Hadrian (117-138 ad) condemning the
practice as tyrannical and likely to deter men from entering into so
treacherous a bargain. It appears that other[1530] emperors had
forbidden it, but there is no proof that they succeeded in stopping it.
At all events the resort to coercion in a matter of contract like this
reveals the presence of a belief in compulsory fixity, ominous of the
coming imperial paralysis, though of course not so understood at the
time. It did not directly affect agriculture as yet; but its application
to agriculture was destined to be a symptom and a cause of the
empire’s decline and fall.
Another group of tenancies, the number and importance of which
was quietly increasing, was that known as praedia Caesaris[1531],
fundi fiscales, and so forth. We need not discuss the departmental
differences and various names of these estates. The tenants,
whether small men or conductores on a large scale who sublet in
parcels[1532] to coloni, held either directly or indirectly from the
emperor. We have seen specimens in Africa, the Province in which
the crown-properties were exceptionally large. What chiefly concerns
us here is the imperial land-policy. It seems clear that its first aim
was to keep these estates permanently occupied by good solvent
tenants. The surest means to this end was to give these estates a
good name, to create a general impression that on imperial farms a
man had a better chance of thriving than on those of average
private landlords. Now the ‘state,’ that is the emperor or his
departmental chiefs, could favour crown-tenants in various ways
without making a material sacrifice of a financial kind. In particular,
the treatment of crown-estates as what we call ‘peculiars,’ in which
local disputes were settled, not by resort to the courts of ordinary
law, but administratively[1533] by the emperor’s procuratores, was
probably a great relief; above all to the humbler coloni, whom we
may surely assume to have been a class averse to litigation. No
doubt a procurator might be corrupted and unjust. But he was
probably far more effectually watched than ordinary magistrates;
and, if the worst came to the worst, there was as we have seen the
hope of a successful appeal to the emperor. Another favour
consisted in the exemption of Caesar’s tenants from various
burdensome official duties in municipalities, the so-called munera,
which often entailed great expense. This is mentioned by a
jurist[1534] near the end of the second century: they are only to
perform such duties so far as not to cause loss to the treasury.
Another[1535], somewhat later, says that their exemption is granted
in order that they may be more suitable tenants of treasury-farms.
This exemption is one more evidence of the well-known fact that in
this age municipal offices were beginning to be evaded[1536] as
ruinous, and no longer sought as an honour. We must note that, if
this immunitas relieved the crown-tenants, it left all the more
burdens to be borne by those who enjoyed no such relief. And this
cannot have been good for agriculture in general.
It is not to be supposed that the fiscus[1537] was a slack and easy
landlord. Goods of debtors were promptly seized to cover liabilities:
attempts to evade payment of tributa by a private agreement[1538]
between mortgagor and mortgagee were quashed: a rescript[1539]
of Marcus and Verus insisted on the treasury share (½) of treasure
trove: and so on. But there are signs of a reasonable and
considerate policy, in not pressing demands so as to inflict hardship.
Trajan[1540] had set a good example, and good emperors followed it.
We may fairly guess that this moderation in financial dealings was
not wholly laid aside in the management of imperial estates. Nor is it
to be imagined that the advantages of imperial tenants were exactly
the same in all parts of the empire. In Provinces through which
armies had to move it is probable that coloni Caesaris would suffer
less[1541] than ordinary farmers from military annoyances. But on
the routes to and from a seat of war it is obvious that the imperial
post-service would be subjected to exceptional strain. Now this
service was at the best of times[1542] a cause of vexations and
losses to the farmers along the line of traffic. The staff made good
all deficiencies in their requirements by taking beasts fodder vehicles
etc wherever they could find them: what they restored was much
the worse for wear, and compensation, if ever got, was tardy and
inadequate. The repair of roads was another pretext for exaction. It
is hardly to be doubted that in these respects imperial tenants
suffered less than others. Some emperors[1543] took steps to ease
the burden, which had been found too oppressive to the roadside
estates. But this seems to have been no more than relief from
official requisitions: irregular ‘commandeering’ was the worst evil,
and we have no reason to think that it was effectually suppressed. It
appears in the next period as a rampant abuse, vainly forbidden by
the laws of the Theodosian code.
L. THE LATER COLONATE, ITS PLACE IN
ROMAN HISTORY.
In the endeavour to extract from scattered and fragmentary
evidence some notion of agricultural conditions in the Roman empire
before and after Diocletian we are left with two imperfect pictures,
so strongly contrasted as to suggest a suspicion of their truth. We
can hardly believe that the system known as the later Colonate
appeared in full force as a sudden phenomenon. Nor indeed are we
compelled to fly so directly in the face of historical experience. That
we have no narrative of the steps that led to this momentous
change, is surely due to the inability of contemporaries to discern
the future effect of tendencies operating silently[1544] and
piecemeal. What seems at the moment insignificant, even if
observed, is seldom recorded, and very seldom intentionally. Hence
after generations, seeking to trace effects to causes, are puzzled by
defects of record. Their only resource is to supplement, so far as
possible, defective record by general consideration of the history of
the time in question and cautious inference therefrom: in fact to get
at the true meaning of fragmentary admissions in relation to their
historical setting. The chief topic to be dealt with here from this
point of view is the character of the Roman Empire in several
aspects. For among all the anxieties of the government during these
troubled centuries the one that never ceased was the fear of failure
in supplies of food.
The character of the Roman Empire had been largely determined
by the fact that it arose from the overthrow of a government that
had long been practically aristocratic. The popular movements that
contributed to this result only revealed the impossibility of
establishing anything like a democracy, and the unreality of any
power save the power of the sword. The great dissembler Augustus
concealed a virtual autocracy by conciliatory handling of the remains
of the nobility. But the Senate, to which he left or gave many
powers, was never capable of bearing a vital part in the
administration, and its influence continued to dwindle under his
successors. The master of the army was the master of the empire,
and influence was more and more vested in those who were able to
guide his policy. That these might be, and sometimes were, not born
Romans at all, but imperial freedmen generally of Greek or mixed-
Greek origin, was a very significant fact. In particular, it marked and
encouraged the growth of departmental bureaus, permanent and
efficient beyond the standard of previous Roman experience. But the
price of this efficiency was centralization, a condition that carried
with it inevitable dangers, owing to the vast extent of the empire. In
modern times the fashionable remedy suggested for over-
centralization is devolution of powers to local governments
controlling areas of considerable size. Or, in cases of aggregation,
the existing powers left to states merged in a confederation are
considerable. In any case, the subordinate units are free to act
within their several limited spheres, and the central government
respects their ‘autonomy,’ only interfering in emergencies to enforce
the fulfilment of definite common obligations.
But, if it had been desired to gain any such relief by a system of
devolution within the Roman empire, this would have meant the
recognition of ‘autonomy’ in the Provinces. And this was
inconceivable. The extension of Roman dominion had been achieved
by dividing Rome’s adversaries. Once conquered, it was the interest
or policy of the central power to keep them in hand by preventing
the growth of self-conscious cohesion in the several units. Each
Province was, as the word implied, a department of the Roman
system, ruled by a succession of Roman governors. It looked to
Rome for orders, for redress of grievances, for protection at need. If
the advance of Rome destroyed no true nations, her government at
least made the development of truly national characteristics
impossible, while she herself formed no Roman nation. Thus, for
better or worse, the empire was non-national. But, as we have
already seen, the decline of Italy made it more and more clear that
the strength of the empire lay in the Provinces. Now, having no
share in initiative and no responsibility, the Provinces steadily lost
vitality under Roman civilization, and became more and more
helplessly dependent on the central power. As the strain on the
empire became greater, the possibility of relief by devolution grew
less: but more centralization was no cure for what was already a
disease.
That local government of a kind existed in the empire is true
enough; also that it was one of the most striking and important
features of the system. But it was municipal, and tended rather to
subdivide than to unite. It was the outcome of a civilization
profoundly urban in its origins and ideas. The notion that a city was
a state was by no means confined to the independent cities of early
Greece. Whether it voluntarily merged itself in a League or lived on
as a subordinate unit in the system of a dominant power, the city
and its territory were politically one. Within their several boundaries
the townsmen and rustic citizens of each city were subject to the
authorities of that community. Beyond their own boundary they were
aliens under the authorities of another city. It is no wonder that
jealousies between neighbour cities were often extreme, and that
Roman intervention was often needed to keep the peace between
rivals. But the system suited Roman policy. In the East and wherever
cities existed they were taken over as administrative units and as
convenient centres of taxation: in the West it was found useful and
practicable to introduce urban centres into tribes and cantons, and
even in certain districts to attach[1545] local populations to existing
cities as dependent hamlets. And, so long as the imperial
government was able to guard the frontiers and avert the shock of
disturbances of the Roman peace, the empire held its own in
apparent prosperity. To some historians the period of the ‘Antonines’
(say about 100-170 ad) has seemed a sort of Golden Age. But signs
are not lacking that the municipal system had seen its best days.
The severe strain on imperial resources in the time of Marcus left
behind it general exhaustion. The decay of local patriotism marked
the pressure of poverty and loss of vitality in the cities. More and
more their importance became that of mere taxation-centres, in
which the evasion of duty was the chief preoccupation: they could
not reinvigorate the empire, nor the empire them.
Another characteristic of the empire, not less significant than
those mentioned above, was this: taken as a whole, it was non-
industrial. Manufactures existed here and there, and products of
various kinds were exchanged between various parts of the empire.
So far as the ordinary population was concerned, the Roman world
might well have supplied its own needs. But this was not enough.
The armies, though perilously small for the work they had to do,
were a heavy burden. The imperial civil service as it became more
elaborate did not become less costly. The waste of resources on
unremunerative buildings and shows in cities, above all in Rome, and
the ceaseless expense of feeding a worthless rabble, were a serious
drain: ordained by established custom, maintained by vanity, to
economize on these follies would seem a confession of weakness.
Nor should the extravagance of the rich, and of many emperors, be
forgotten: this created a demand for luxuries chiefly imported from
the East; precious stones, delicate fabrics, spices, perfumes, rare
woods, ivory, and so forth. Rome had no goods to export in payment
for such things, and the scarcity of return-cargoes must have added
heavily to the cost of carriage. There was on this account a steady
drain of specie to the East, and this had to be met by a
corresponding drain of specie to Rome. In one form or another this
meant money drawn from the Provinces, for which the Provinces
received hardly the bare pretence of an equivalent, or a better
security for peace.
Thus the empire, created by conquest and absorption,
administered by bureaucratic centralization, rested on force; a force
partly real and still present, partly traditional, derived from a
victorious past. The belief in Rome as the eternal city went for much,
and we hear of no misgivings as to the soundness of a civilization
which expressed itself in a constant excess of consumption over
production. Naturally enough, under such conditions, the imperial
system became more and more what it really was from the first, a
vast machine. It was not a league of cooperating units, each
containing a vital principle of growth, and furnishing the power of
recovery from disaster. Its apathetic parts looked passively to the
centre for guidance or relief, depending on the perfection of a
government whose imperfection was assured by attempting a task
beyond the reach of human faculty and virtue. The exposure of the
empire’s weakness came about through collision with the forces of
northern barbarism. What a machine could do, that it did, and its
final failure was due to maladies that made vain all efforts to renew
its internal strength.
The wars with the northern barbarians brought out with singular
clearness two important facts, already known but not sufficiently
taken into account. First, that the enemy were increasing in numbers
while the people of the empire were in most parts stationary or even
declining. Bloody victories, when gained, did practically nothing to
redress the balance. Secondly, that at the back of this embarrassing
situation lay a food-question of extreme seriousness and complexity.
More and more food was needed for the armies, and the rustics of
the empire, even when fitted for military service, could not be
spared from the farms without danger to the food-supply. The
demands of the commissariat were probably far greater than we
might on the face of it suppose; for an advance into the enemy’s
territory did not ease matters. Little or nothing was found to eat:
indeed it was the pressure of a growing population on the means of
subsistence that drove the hungry German tribes to face the Roman
sword in quest of abundant food and the wine and oil of the South
and West. The attempt of Marcus and others after him, to solve the
problems of the moment by enlisting barbarians in Roman armies,
was no permanent solution. The aliens too had to be fed, and their
pay in money could not be deferred. Meanwhile the taxation of the
empire inevitably grew, and the productive industries had to stagger
along under heavier burdens. The progressive increase of these is
sufficiently illustrated in the history of indictiones. At first an indictio
was no more than an occasional[1546] impost of so much corn levied
by imperial proclamation on landed properties in order to meet
exceptional scarcity in Rome. But it was in addition to the regular
tributum, and was of course most likely to occur in years when
scarcity prevailed. No wonder it was already felt onerous[1547] in the
time of Trajan. Pressure on imperial resources caused it not only to
become more frequent, and eventually normal: it was
extended[1548] to include other products, and became a regular
burden of almost universal application, and ended by furnishing a
new chronological unit, the Indiction-period of 15 years.
That agriculture, already none too prosperous, suffered heavily
under this capricious impost in the second century, seems to me a
fact beyond all doubt. And, not being then a general imperial tax, it
fell upon those provinces that were still flourishing producers of
corn. Debasement of currency already lowered the value of money-
taxes, and tempted emperors to extend the system of dues in kind.
Under Diocletian and Galerius things came to a head. Vast increase
of taxation was called for under the new system, and it was mainly
taxation in kind. Already the failure of agriculture was notorious, and
attempts had been made to enforce cultivation of derelict lands. The
new taxation only aggravated present evils, and in despair of milder
measures Constantine attached the coloni to the soil. Important as
the legal foundation of the later serf-colonate, this law is historically
still more important as a recognition of past failure which nothing
had availed to check. He saw no way of preventing a general
stampede from the farms save to forbid it as illegal, and to employ
the whole machinery of the empire in enforcing the new law. This
policy was only a part of the general tendency to fix everything in a
rigid framework, to make all occupations hereditary, that became
normal in the later Empire. The Codes are a standing record of the
principle that the remedy for failure of legislation was more
legislation of the same kind. Hard-pressed emperors needed all the
resources they could muster, particularly food. They had no
breathing-space to try whether more freedom might not promote
enterprise and increase production, even had such a policy come
within their view. Hence the cramping crystallizing process went on
with the certainty of fate. The government, unable to develope
existing industry, simply squeezed it to exhaustion.
How came it that the government was able to do this? How came
it that agricultural tenants could be converted into stationary serfs
without causing a general upheaval[1549] and immediate dissolution
of the empire? Mainly, I think, because the act of Constantine was
no more than a recognition de iure of a condition already created de
facto by a long course of servilizing influences. Also because it was
the apparent interest, not only of the imperial treasury but of the
great proprietors generally, to tie down to the soil[1550] the
cultivators of their estates. Labour was now more valuable than
land. In corn-growing Africa the importance attached to the task-
work of sub-tenants was a confession of this. And, law or no law,
things had to move in one or other direction. Either the landlord and
head-lessee had to win further control of the tenants, or the tenants
must become less dependent. Only the former alternative was
possible in the circumstances; and the full meaning of the change
that turned de facto dependence into legal constraint may be stated
as a recognition of the colonus as labourer rather than tenant.
Whether the settlement of barbarians as domiciled aliens in some
Provinces under strict conditions of farm-labour had anything to do
with the creation of this new semi-servile status, seems hardly to be
decided on defective evidence. At all events it cannot have hindered
it. And we must make full allowance for the effect of various
conditions in various Provinces. If we rightly suppose that the
position of coloni had been growing weaker for some time before the
act of Constantine, this does not imply that the process was due to
the same causes operating alike in all parts of the empire in the
same degree. The evidence of the Theodosian Code shews many
local differences of phenomena in the fourth and fifth centuries; and
it is not credible that there was a greater uniformity in the conditions
of the preceding age. Laws might aim at uniformity, but they could
not alter facts.
My conclusion therefore is that the general character of the
imperial system was the main cause of the later serf-colonate.
However much the degradation of free farm-tenants, or the
admission of slaves to tenancies, or the settlement of barbarians
under conditions of service, may have contributed to the result, it
was the mechanical nature of the system as a whole that gave effect
to them all. After Trajan the rulers of the empire became more and
more conscious that the problem before them was one of
conservation, and that extension was at an end. Hadrian saw this,
and strove to perfect the internal organization. By the time of
Aurelian it was found necessary to surrender territory as a further
measure of security. We can hardly doubt that under such conditions
the machine of internal administration operated more mechanically
than ever. Then, when the reforms of Diocletian made fresh taxation
necessary to defray their cost, an agricultural crisis was produced by
the turning of the imperial screw. The hierarchy of officials justified
their existence by squeezing an assured revenue out of a population
unable to resist but able to remove. There was no other source of
revenue to take the place of the land: moreover, it was agricultural
produce in kind that was required. Therefore the central
bureaucracy, unchecked by any public opinion, did after its wont. In
that selfish and servile world each one took care of his own skin.
Compulsion was the rule: the coloni must be made to produce food:
therefore they must be bound fast to the soil, or the empire would
starve—and the officials with it.

ADDITIONAL NOTES TO CHAPTER L.

I cannot lose this opportunity of referring to a very interesting


little book by M. Augé-Laribé, L’évolution de la France agricole [Paris
1912]. Much of it bears directly on the labour-question, and sets
forth the difficulties hindering its solution. It is peculiarly valuable to
a student of the question in the ancient world, because it lays great
stress on the effect of causes arising from modern conditions.
Causes operating in both ancient and modern times are thereby
made more readily and clearly perceptible. Such modern influences
in particular as the vast development of transport, the concentration
of machine-industries in towns, and the constant attraction of better
and more continuous wage-earning, by which the rustic is drawn to
urban centres, are highly significant. The difference from ancient
conditions is so great in degree that it practically almost amounts to
a difference in kind. So too in the material resources of agriculture:
the development of farm-machinery has superseded much hand-
labour, while Science has increased the possible returns from a given
portion of soil.
Most significant of all from my point of view is the author’s
insistence on the irregularity of wage-earning in rustic life as an
active cause of the flitting of wage-earners to the towns. This brings
it home to a student that a system of rustic slavery implies a set of
conditions incompatible with such an economic migration; and also
that the employment of slaves by urban craftsmen would not leave
many eligible openings for immigrant rustics. It is fully consistent
with my view that the wage-earning rustic was a rare figure in the
Greco-Roman world.
It is perhaps in the remedies proposed by the author for present
evils (and for the resulting depopulation of the countryside) that the
contrast of ancient and modern is most clearly marked. Bureaucratic
the French administrative system may be: but it is not the
expression of a despotism that enslaves its citizens in the frantic
effort to maintain itself against pressure from without. For
individuals and organizations are free to think speak and act, and so
to promote what seems likely to do good. Initiative and invention are
not deadened by the fear that betterment will only serve as a
pretext for increase of burdens. Stationary by instinct the French
peasant proprietor may be: but he is free to move if he will, and no
one dare propose to tie him to the soil by law.
Nor can I omit a reference to a paper of the late Prof Pelham on
The Imperial domains and the Colonate (1890, in volume of Essays,
Oxford 1911).
The simplicity of the solution there offered is most attractive, and
the general value of the treatise great. But I do not think it a final
solution of the problem. Not only are there variations of detail in the
domains known to us from the African inscriptions (some of them
found since 1890). That some of the regulations may have been
taken over from those of former private owners is a point not
considered. And there is no mention of the notable requisition of the
services of coloni as mere retainers, to which Caesar refers without
comment (above pp 183, 254). Therefore, while I welcome the
proposition that the system of the Imperial domains had much to do
with the creation of the later Colonate, I still think that earlier and
more deep-seated causes cannot safely be ignored. Perhaps this is
partly because I am looking at the matter from a labour point of
view.
FROM DIOCLETIAN
LI. GENERAL INTRODUCTION.
If we desire to treat History as the study of causation in the affairs
of mankind—and this is its most fruitful task—we shall find no more
striking illustration of its difficulties than the agricultural system of
the later Roman Empire. In the new model of Diocletian and
Constantine we see the imperial administration reorganized in new
forms[1551] deliberately adopted: policy expresses itself, after a
century of disturbance, in a clear breach with the past. But, when
Constantine in 332 legislates[1552] to prevent coloni from migrating,
he refers to a class of men who are not their own masters but
subject to control (iuris alieni), though he distinguishes them from
slaves. Evidently he is not creating a new class: his intention is to
prevent an existing class from evading its present responsibilities.
They are by the fact of their birth attached as cultivators to their
native soil. With this tie of origo[1553] goes liability to a certain
proportion of imperial tax (capitatio). This is mentioned as a matter
of course. Now we know that such serf-coloni formed at least a large
part of the rustic population under the later Empire. We cannot but
see that the loss of the power of free migration is the vital difference
that marks off these tied farmers from the tenant farmers of an
earlier period, the class whom Columella advised landlords to retain
if possible. For these men cannot move on if they would. How came
they to be in this strange condition, in fact neither slave nor free, so
that Constantine had merely to crystallize relations already
existing[1554] and the institution of serf-tenancy became a regular
part of the system? If we are to form any notion of the conditions of
farm labour in this period, we must form some notion of the causes
that produced the later or dependent colonate. And this is no simple
matter: on few subjects has the divergence of opinions been more
marked than on this. I have stated my own conclusions above, and
further considerations are adduced in this chapter.
Our chief source of evidence is the collection of legal acts of the
Christian emperors issued by authority in the year 438, and known
as the codex Theodosianus. It covers a period of more than a
hundred years, and innumerable references to the land-questions
attest the continual anxiety of the imperial government to secure
adequate cultivation of every possible acre of land. Contemporary
history may suggest motives for this nervousness. The increased
expenses of the court and the administrative system made it
necessary to raise more taxes than ever for the civil services. The
armies, now mainly composed of Germans and other barbarians,
were necessary for imperial defence, but very costly to equip pay
and feed. Whether they were mercenaries drawing wages, or aliens
settled as Roman subjects within the empire on lands held by tenure
of military service, they were either a burden on the treasury or a
doubtful element of the population that must at all costs be kept in
good humour. On a few occasions Roman victories furnished
numbers of barbarian prisoners to the slave-market. These would be
dispersed over various districts, generally at some distance from the
troubled frontiers, and the rustic slaves of whom we hear were
doubtless in great part procured in this way. But that the rustic
population consisted largely of actual slaves we have no reason to
believe. Of estates worked on a vast scale by slave labour we hear
nothing. Naturally; for the social and economic conditions favourable
to that system had long passed away. Slaves were no longer
plentiful, markets were no longer free. Under the Empire, the pride
of great landlords needed a strong mixture of caution; under a
greedy or spendthrift emperor the display of material wealth was apt
to be dangerous. In the century of confusion before Diocletian
agriculture had been much interrupted in many parts of the empire,
and much land had gone out of cultivation. So serious was the
situation in the later part of that period, that Aurelian[1555] imposed
upon municipal senates the burden of providing for the cultivation of
derelict farms.
When a taxpayer is required to pay a fixed amount in a stable
currency, he knows his liability. So long as he can meet it, any
surplus income remains in his hands, and he has a fair chance of
improving his economic position by thrift. If what the state really
wants is (say) corn, it can use its tax-revenue to purchase corn in
the open market. But this assumes that the producer is free to stand
out for the best price he can get, and that he will be paid in money
on the purchasing power of which he can rely for his own needs.
This last condition had ceased to exist[1556] in the Roman empire.
Not to mention earlier tamperings with the currency, since the
middle of the third century its state had been deplorable. Things had
now gone so far that the value of the fixed money taxes seriously
reduced the income derived from them: the government was literally
paid in its own coin. The policy of Diocletian was to extend an old
practice of exacting payment in kind, and this became the principal
method[1557] of imperial taxation. We must bear in mind that the
supply of corn for the city of Rome, the annona urbis, went on as
before, though the practical importance of Rome was steadily
sinking. Diocletian made it no longer the residence of emperors, and
Constantine founded another capital in the East: but Rome was still
fed by corn-tributes from the Provinces, chiefly from Africa and
Egypt. When the New Rome on the Bosporus was fully equipped as
an imperial capital, Egypt was made liable for the corn-supply of the
Constantinopolitan populace. Old Rome had then to rely almost
entirely on Africa, with occasional help from other sources. Italy
itself[1558] was now reduced to the common level, cut up into
provinces, and liable for furnishing supplies of food. But it was
divided into two separate regions: the northern, officially named
Italia, or annonariae regiones, in which a good deal of corn was
grown, had to deliver its annona at Mediolanum (Milan) the new
imperial headquarters: the southern, suburbicariae (or urbicariae)
regiones, in which little corn was grown, sent supplies of pigs cattle
wine firewood lime etc to Rome. The northern annona, like that from
other provinces, helped to maintain military forces and the host of
officials employed by the government. For it soon became the
practice to pay salaries in kind. In the pitiful state of the currency
this rude method offered the best guarantee for receipt of a definite
value.
Unhappily this exaction and distribution in kind was at best a
wasteful process. At worst it was simply ruinous. The empire was
subject to constant menace of attack, and was in dire need of the
largest possible income raised on the most economical system. If the
ultimate basis of imperial strength was to be found in the food-
producers, it was all-important to give the farming classes a feeling
of security sufficient to encourage industry and enterprise, and at all
costs to avoid reducing them to despair. Nor was the new census as
designed by Diocletian on the face of it an unjust and evil institution.
Taking account of arable lands and of the persons employed in
cultivating them, it aimed at creating a fixed number[1559] of
agricultural units each of which should be liable to furnish the same
amount of yearly dues in kind. But it is obvious that to carry out this
doctrinaire scheme with uniform neatness and precision was not
possible. To deal fairly with agriculture a minute attention to local
differences and special peculiarities was necessary, and this attention
could not be given on so vast a scale. Perhaps careful observation
and correction of errors might have produced a reasonable degree of
perfection in a long period of unbroken peace: but no such period
was at hand. The same strain that drove the imperial government to
the new taxation also prevented any effective control of its working.
It is perhaps inevitable that the exaction of dues in kind should
lead to abuses. At all events, abuses in this department were no new
thing: the sufferings of such Provinces as Sicily and Asia were
notorious in the time of the Republic. A stricter control had made the
state of things much better in the first two centuries of the Empire.
The exploitation of the Provincials was generally checked, and the
imperial government was not as yet driven by desperate financial
straits to turn extortioner itself. Caracalla’s law of 212, extending the
Roman franchise[1560] to all free inhabitants, was a symptom of
conscious need, for it brought all estates under the Roman
succession-tax. At the same time it did away with the old distinction
between the ruling Roman people and the subject nationalities:
henceforth, wherever there was oppression within the Roman world,
it necessarily fell upon Roman[1561] citizens. Time had been when
the Roman citizen, free to move into any part of the Roman
dominions and to acquire property there[1562] under protection of
Roman law, made full use of the opportunities afforded him, to the
disadvantage of the subject natives. Now all alike were the helpless
subjects of a government that they could neither reform nor
supersede; a government whose one leading idea was to bring all
institutions into fixed grooves in which they should move
mechanically year after year, unsusceptible of growth or decay. True,
the plan was absurd, and some few observers may have detected its
absurdity. But the power of challenging centralized officialism and
evoking expression of public opinion, never more than rudimentary
in the Roman state, was now simply extinct. Things had come to
such a pass that, speaking generally, a citizen’s choice lay between
two alternatives. Either he must bear an active part in the system
that was squeezing out the vital economic forces of the empire,
making whenever possible a profit for himself out of a salary or illicit
gains; or he must submit passively to all such extortions as the
system, worked by men whose duty and interest alike tended to
make them merciless, was certain to inflict. The oppressors, though
numerous, could only be few in proportion to the whole free
population. Therefore the vast majority stood officially condemned to
lives of penury and wretchedness. The system became more hard-
set and the outlook more hopeless with the lapse of time.
The dues exacted from the various parts of the empire varied in
quality[1563] according to local conditions, and to some extent in
methods of collection. In the frontier Provinces the quantity was
sometimes reduced[1564] by remissions, when a district ravaged by
invaders was relieved for a few years that it might recover its normal
productiveness. The details of these variations are beyond the scope
of the present inquiry. The general principle underlying the whole
system was the fixing of taxation-units equal in liability, and the
organizing of collection in municipal groups. Each municipal town or
civitas was the administrative centre of a district, and stood charged
in the imperial ledgers as liable for the returns from a certain
number of units, this number being that recorded as existing at the
last quinquennial census. For the collection the chief municipal
authorities were responsible; and they had to hand over the amount
due to the imperial authorities, whether they had received it in full or
not. Already burdened with strictly municipal liabilities, the members
of municipal senates (curiales) were crushed by this additional and
incalculable pressure. Unable to resist, they generally took the
course of so using their functions and powers as to protect their own
interests as far as possible. One obvious precaution was to see that
the number of taxable units[1565] in their district was not fixed too
high by the census officials. This precaution was certainly not
overlooked, and success in keeping down the number may well have
been the chief reason why the system was able to go on so long.
The curiales were mostly considerable landlords, residing in their
town and letting their land to tenants. But there were other
landlords, smaller men, some also resident in the towns, others in
the country. We still hear of men farming land[1566] of their own,
and it seems that some of these held and farmed other land also, as
coloni of larger landlords. When any question arose as to the
number of units for the tax on which this or that farm was liable, it is
clear that the interests of different classes might easily clash. And
the curiales undoubtedly took care[1567] that their own and those of
their friends did not suffer.
These remarks imply that the system practically worked in favour
of the richer classes[1568] as against the poorer. And so it certainly
did, not only in the time of revision at the census each fifth year, but
on other occasions. If an invasion or some other great disaster led
the emperor to grant temporary relief, this would normally take the
form of reducing the number of taxable units in the district for a
certain period. But the local authorities were left to apportion this
reduction[1569] among the several estates, and the poor farmers had
no representative to see that they got their fair share of relief.
Moreover, outside taxation, the farmers were often subjected to
heavy burdens and damage by the irregular requisitions of imperial
officials. For instance, the staff of the imperial post-service (cursus
publicus)[1570] were a terror. They pressed the goods of farmers into
the service of their department on various pretexts, and exacted
labour on upkeep of roads and stations. For their tyranny there was
no effective compensation or redress. Like other officials, they could
be bought off by bribes: but this meant that the various
exactions[1571] were shifted from the shoulders of the rich to those
of the poor. Another iniquity, the revival of a very old[1572] abuse,
was connected with the question of transport, an important
consideration in the case of dues in kind, often bulky. For instance,
in the case of corn, the place at which it had to be delivered might
easily count for more in estimating the actual pressure of the burden
than the amount of grain levied. In making the arrangements for
delivery there were openings for favouritism and bribery.
Circumstances varied greatly in various parts of the empire. In some
Provinces delivery was made at a military depot within easy reach.
Transport by sea from Egypt or Africa was carried on by gilds[1573]
of shippers, who became more and more organized and regulated by
law. But in many parts good roads were few, and laid out for
strategic reasons; the country roads inconvenient and rough: and for
transport in bulk the post-service provided no machinery available
for the use of private persons.
It is not necessary here to follow out in detail all the particular
discomforts and grievances of the farming classes under the system
devised by Diocletian and developed by his successors. Enough has
been said to shew that they were great, and to remove all ground
for wondering that the area of arable land actually under tillage, and
with it population, continued to decline. Constantine’s law confirming
the bondage of coloni to the soil by forbidding movement was the
confession of a widespread evil, but no remedy. Repeated legislation
to the same purpose only recorded and continued the failure. When
all the resources of evasion were exhausted, the pauperized serf fled
to a town and depended for a living on the pitiful doles of private or
ecclesiastical charity, or turned brigand and took precarious toll of
those who still had something to lose. In either case he was an
additional burden on a society that already had more than it could
bear. In 382 we find an attempt[1574] made to put down ‘sturdy
beggars.’ The law rewarded anyone who procured the conviction of
such persons by handing over the offenders to him. An ex-slave
became the approver’s own slave, and one who had nothing of his
own beyond his freeborn quality was granted to him as his colonus
for life. But this law seems to have been ineffectual like others.
Desertion of farms might to some extent be checked, but mendicity
and brigandage remained.
There was however another movement, later in time and less in
volume, but not less serious as affecting the practical working of the
imperial machine. With the increase of poverty life in municipal
towns became less attractive. Local eminence was no longer an
object of ambition; for to local burdens, once cheerfully borne, was
now added a load of imperial responsibilities which lay heavy on all
men of property, and which they could neither shake off nor control.
In hope of evading them, well-to-do citizens took refuge[1575] in the
country, either on estates of their own or under the protection of
great landlords already settled there. But to allow this would mean
the depletion of the local senates (curiae) on whose services as
revenue-collectors the financial system of the empire depended. To
prevent men qualified for the position of curiales from escaping that
duty was the aim of legislation[1576] which by repeated enactments
confessed its own failure. That there were country magnates, men
of influence (potentes), whose protection might seem able to screen
municipal defaulters, is a point to be noted. They were the great
possessores[1577] (a term no longer applied to small men), who held
large estates organized on a sort of manorial model, and sometimes
ruled them like little principalities, territorial lordships[1578] standing
in direct relations with the central authorities and not hampered by
inclusion in the general municipal scheme. Such ‘peculiars’ had
existed under the earlier Empire, and evidently continued to exist:
the Crown-lands of the emperors, especially in Africa, were the most
signal cases. But the great private Possessor could not secure to his
domain the various exemptions[1579] that emperors conferred on
theirs. He had to collect and pay over[1580] the dues from his estate,
as a municipal magistrate did from the district round his town-
centre. But he had a more immediate and personal interest in the
wellbeing of all his tenants and dependants, whose presence and
prosperity gave to his land by far the greater part[1581] of its value.
That territorial magnates should be free to build up a perhaps
dangerous power in various corners of the empire by gathering
dependants round them, could hardly be viewed with approval by
the jealousy of emperors. Not only was the system of letting land in
parcels to tenants spreading, but the power of the landlords over
them was increasing, long before Constantine took the final step of
treating them as attached permanently to the soil. Whether they
were the landlord’s free tenants who had gradually lost through
economic weakness the effective use of freedom; or small
freeholders who had found it worth their while to part with their
holdings to a big man and become his tenants for the sake of
enjoying his protection; or former slaves to whom small farms had
been entrusted on various conditions; they were in a sort of
economic bondage. Doubtless most of them lived from hand to
mouth, but we have no reason to believe that poverty, so long as
they had plenty to live on, was the motive[1582] that made them
wish to give up their holdings and try their luck elsewhere. It was
the cruel pressure of Diocletian’s new taxation, and the army of
officials employed to enforce it, that drove them to despair. A
contemporary witness[1583] tells us, referring to this very matter, ‘the
excess of receivers over givers was becoming so marked that farms

You might also like