0% found this document useful (0 votes)
4 views

Guide to Java: A Concise Introduction to Programming (2nd Edition) James T. Streib download

The document is a guide to the second edition of 'Guide to Java: A Concise Introduction to Programming' by James T. Streib and Takako Soma, aimed at teaching Java programming fundamentals quickly and effectively. It emphasizes a balance between comprehensive examples and concise explanations, making it suitable for beginners and those with some programming experience. The text includes early introductions to object-oriented programming, numerous exercises, and updates in the second edition to enhance clarity and introduce new topics such as computational thinking and parallel processing.

Uploaded by

zampuunkhasi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Guide to Java: A Concise Introduction to Programming (2nd Edition) James T. Streib download

The document is a guide to the second edition of 'Guide to Java: A Concise Introduction to Programming' by James T. Streib and Takako Soma, aimed at teaching Java programming fundamentals quickly and effectively. It emphasizes a balance between comprehensive examples and concise explanations, making it suitable for beginners and those with some programming experience. The text includes early introductions to object-oriented programming, numerous exercises, and updates in the second edition to enhance clarity and introduce new topics such as computational thinking and parallel processing.

Uploaded by

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

Guide to Java: A Concise Introduction to

Programming (2nd Edition) James T. Streib pdf


download

https://ebookmeta.com/product/guide-to-java-a-concise-
introduction-to-programming-2nd-edition-james-t-streib/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Concise Guide To Databases: A Practical Introduction


Konstantinos Domdouzis

https://ebookmeta.com/product/concise-guide-to-databases-a-
practical-introduction-konstantinos-domdouzis/

A Concise Introduction to Robot Programming with ROS2


1st Edition Francisco Martín Rico

https://ebookmeta.com/product/a-concise-introduction-to-robot-
programming-with-ros2-1st-edition-francisco-martin-rico/

Introduction to Programming with Java: A Problem


Solving Approach 3rd Edition John Dean

https://ebookmeta.com/product/introduction-to-programming-with-
java-a-problem-solving-approach-3rd-edition-john-dean/

The Eagle Has Eyes The FBI Surveillance of César


Estrada Chávez of the United Farm Workers Union of
America 1965 1975 1st Edition José Angel Gutiérrez

https://ebookmeta.com/product/the-eagle-has-eyes-the-fbi-
surveillance-of-cesar-estrada-chavez-of-the-united-farm-workers-
union-of-america-1965-1975-1st-edition-jose-angel-gutierrez/
War in the Mountains: Peasant Society and
Counterinsurgency in Algeria, 1918-1958 1st Edition
Neil Macmaster

https://ebookmeta.com/product/war-in-the-mountains-peasant-
society-and-counterinsurgency-in-algeria-1918-1958-1st-edition-
neil-macmaster/

Stunt Doubled Roommates 3 1st Edition Stephanie Brother

https://ebookmeta.com/product/stunt-doubled-roommates-3-1st-
edition-stephanie-brother/

Software Telemetry 1st Edition Jamie Riedesel

https://ebookmeta.com/product/software-telemetry-1st-edition-
jamie-riedesel/

Fakemas A Holiday Instalove Romance Briar Vale 1st


Edition Gia Bailey

https://ebookmeta.com/product/fakemas-a-holiday-instalove-
romance-briar-vale-1st-edition-gia-bailey/

Handbook Factory Planning And Design 1st Edition Hans-


Peter Wiendahl

https://ebookmeta.com/product/handbook-factory-planning-and-
design-1st-edition-hans-peter-wiendahl/
Wavelet Analysis: Basic Concepts and Applications 1st
Edition Sabrine Arfaoui

https://ebookmeta.com/product/wavelet-analysis-basic-concepts-
and-applications-1st-edition-sabrine-arfaoui/
Undergraduate Topics in Computer Science

James T. Streib · Takako Soma

Guide to Java
A Concise Introduction
to Programming
Second Edition
Undergraduate Topics in Computer Science

Series Editor
Ian Mackie, University of Sussex, Brighton, UK

Advisory Editors
Samson Abramsky , Department of Computer Science, University of Oxford,
Oxford, UK
Chris Hankin , Department of Computing, Imperial College London, London, UK
Mike Hinchey , Lero – The Irish Software Research Centre, University of
Limerick, Limerick, Ireland
Dexter C. Kozen, Department of Computer Science, Cornell University, Ithaca,
NY, USA
Andrew Pitts , Department of Computer Science and Technology, University of
Cambridge, Cambridge, UK
Hanne Riis Nielson , Department of Applied Mathematics and Computer Science,
Technical University of Denmark, Kongens Lyngby, Denmark
Steven S. Skiena, Department of Computer Science, Stony Brook University, Stony
Brook, NY, USA
Iain Stewart , Department of Computer Science, Durham University, Durham,
UK
Joseph Migga Kizza, College of Engineering and Computer Science,
The University of Tennessee-Chattanooga, Chattanooga, TN, USA
‘Undergraduate Topics in Computer Science’ (UTiCS) delivers high-quality
instructional content for undergraduates studying in all areas of computing and
information science. From core foundational and theoretical material to final-year
topics and applications, UTiCS books take a fresh, concise, and modern approach
and are ideal for self-study or for a one- or two-semester course. The texts are all
authored by established experts in their fields, reviewed by an international advisory
board, and contain numerous examples and problems, many of which include fully
worked solutions.
The UTiCS concept relies on high-quality, concise books in softback format, and
generally a maximum of 275–300 pages. For undergraduate textbooks that are
likely to be longer, more expository, Springer continues to offer the highly regarded
Texts in Computer Science series, to which we refer potential authors.
James T. Streib Takako Soma

Guide to Java
A Concise Introduction to Programming

Second Edition

123
James T. Streib Takako Soma
Program in Computer Science Program in Computer Science
Illinois College Illinois College
Jacksonville, IL, USA Jacksonville, IL, USA

ISSN 1863-7310 ISSN 2197-1781 (electronic)


Undergraduate Topics in Computer Science
ISBN 978-3-031-22841-4 ISBN 978-3-031-22842-1 (eBook)
https://doi.org/10.1007/978-3-031-22842-1

1st edition: © Springer-Verlag London 2014


2nd edition: © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer
Nature Switzerland AG 2023
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether
the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and
transmission or information storage and retrieval, electronic adaptation, computer software, or by similar
or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publication does not imply, even in the absence of a specific statement, that such names are exempt from
the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors, and the editors are safe to assume that the advice and information in this
book are believed to be true and accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, expressed or implied, with respect to the material contained
herein or for any errors or omissions that may have been made. The publisher remains neutral with regard
to jurisdictional claims in published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface

James T. Streiba,1 and Takako Somaa,2


a
Computer Science Program, Illinois College, Jacksonville, IL, USA
1
Email: [email protected].
2
Email: [email protected].

Purpose
The purpose of this text is to help the reader learn very quickly how to program using the
Java programming language. This is accomplished by concentrating on the fundamentals,
providing plenty of illustrations and examples, and using visual contour diagrams to
illustrate the object-oriented semantics of the language.

Comparison to Other Texts


There are a number of texts on the Java programming language. Some of these texts provide
plenty of examples and are very comprehensive, but unfortunately, they sometimes seem
to cover too many details, which might make it difficult for a beginning programmer to
discern which points are the most relevant. There are also other texts that attempt to provide
a shortened introduction to the language, but it seems that these texts might not provide the
necessary examples and illustrations and might be better suited for readers who have
previous programming experience.

Need
This text attempts to fill the gap between the above two types of books. First, it provides
plenty of examples and concentrates primarily on the fundamentals of the Java
programming language so that the reader can stay focused on the key concepts. Second, by
concentrating on the fundamentals, it allows the text to be more concise and yet still
accessible to readers who have no prior programming experience. The result is that the
reader can learn the Java programming language very quickly and also have a good
foundation to learn more complex topics later.

Features of This Text


This text provides many examples and illustrations. It further has an early introduction to
object-oriented programming and uses contour diagrams to illustrate various object-
oriented concepts. The contour model was originally developed by John B. Johnson [4].
The model was elaborated on by Organick, Forsythe, and Plummer to illustrate
subprograms, parameter passing, and recursion in procedural and functional languages [7].
The model seems quite adaptable to newer programming methodologies such as object-
oriented programming as illustrated in a paper by the authors of this text [8]. As discussed
in that paper, it was shown that the use of contour diagrams can be an effective tool in

v
vi Preface

helping one learn object-oriented concepts in the Java programming language. By


acquiring a good working model of objects, there is less chance of possible misconceptions.
In many places in the text, questions are asked of the reader to help them interact with
the material and think about the subject matter just presented. Hopefully the reader will
take a few moments to try to answer these questions on their own before proceeding to the
answer that follows. To help further reinforce concepts, each chapter has one or more
complete programs to illustrate many of the concepts presented and also to help readers
learn how to write programs on their own. In addition, for review and practice, there are
summaries and exercises provided at the end of each chapter. Further, in the appendices at
the end of the text, there are answers to selected exercises and a glossary of important
terms. A summary of the features of this text are listed below:
‡ Stresses the fundamentals.
‡ Provides many examples and illustrations.
‡ Has an early introduction to objects.
‡ Uses contour diagrams to illustrate object-oriented concepts.
‡ Asks readers questions to help them interact with the material.
‡ Has one or more complete programs in every chapter.
‡ Provides chapter summaries.
‡ Includes exercises at the end of each chapter, with selected answers in an appendix.
‡ Has a glossary of important terms.

Features New to the Second Edition

The second edition retains all the features of the first edition. In addition to fixing any
known errors, any areas that could be clarified have been reworded. Features new to the
second edition, include the following:

‡ Chapter 1 has been reorganized into Chapters 0 and 1. Whereas an experienced


programmer can go straight to Chapter 1, it is recommended a new programmer or an
experienced programmer who wants a review start with the computer concepts in
Chapter 0.
‡ Chapter 0 contains new topics such as computational thinking and computer ethics.
‡ Where previously some topics in Chapter 1 were scattered in different sections, they
have been consolidated into single sections to help the reader focus on each topic
individually.
‡ Simple graphical user interface (GUI) is introduced in Chapter 1 and used in different
sections throughout the text.
‡ Chapter 11 has been added to include an introduction to bit-wise logic for computer
science students taking computer organization in the future or for pre-engineering
students to gain exposure to some of the logic capabilities in the C-like languages.
‡ Chapter 12 introduces parallel processing programming for computer science students
who will be taking a course in operating systems in the future.
‡ Appendix A contains a detailed description of the Java skeleton introduced in Chapter
1 along with additional information on standard output and GUI.
‡ Additional exercises have been added to various chapters.
Preface vii

Overview of the Chapters


This text first introduces the reader to various computer concepts such as hardware,
software, computational thinking, software design, and computer ethics. It then allows the
reader to understand a simple program with the appropriate input, processing, and output,
followed by an early introduction to objects. It then looks at selection and iteration
structures followed by more object-oriented concepts. Next, strings and arrays are
examined. This is followed by recursion, inheritance and polymorphism, and elementary
files. Then there is an introduction to bit-wise logic and parallel processing. The appendices
include information on the Java skeleton, standard output, graphical input/output,
exception processing, Javadoc, a glossary, and answers to selected exercises. Lastly, there
are references, useful websites and an index. The following provides a brief synopsis of
the chapters and appendices:
.
‡ Chapter 0 begins with the computer concepts of hardware/software, computational
thinking, design, and computer ethics.
‡ Chapter 1 provides an introduction to variables, input/output, and arithmetic
operations.
‡ Chapter 2 introduces objects and contour diagrams.
‡ Chapter 3 explains selection structures.
‡ Chapter 4 shows how iteration structures work.
‡ Chapter 5 revisits object-oriented concepts.
‡ Chapter 6 introduces string variables and processing.
‡ Chapter 7 illustrates arrays and array processing.
‡ Chapter 8 examines recursion.
‡ Chapter 9 explores inheritance and polymorphism.
‡ Chapter 10 discusses elementary files.
‡ Chapter 11 describes how bit-wise logic works
‡ Chapter 12 introduces parallel processing programming.
‡ Appendix A elaborates on the Java skeleton, standard output, and graphical
input/output.
‡ Appendix B discusses elementary exception processing.
‡ Appendix C presents the basics of Javadoc.
‡ Appendix D lists a glossary of key terms.
‡ Appendix E provides answers to selected exercises.

Ordering of the Chapters

Typically, there are three ways objects can be introduced to the beginning programmer:

‡ Objects first.
‡ Objects last.
‡ Objects interleaved.

This text takes the latter approach where objects are discussed in Chapters 2, 5, and 9.
However, recognizing that some readers and instructors might want to use one of the first
two approaches, this text can be read using alternative orders. For example, should an
viii Preface

objects first approach want to be taken, after reading Chapter 1, Chapters 2 and 5 can be
read next, followed by Chapters 3 and 4. Should an object later approach want to be used,
Chapters 3 and 4 can be read prior to Chapters 2 and 5.

To help facilitate these alternative approaches, starting with Chapter 3, the Complete
Program sections at the end of each chapter have examples with and without using objects.
Note that Chapter 9 requires an understanding of arrays, which is covered in Chapter 7,
and it can be read after completing that chapter.

Scope
As mentioned previously, this text concentrates on the fundamentals of the Java
programming language such as input/output, object-oriented programming, arithmetic and
logic instructions, control structures, strings, arrays including elementary sorting and
searching, recursion, files, bit-wise logic, and parallel processing programming. As a result,
it might not cover all the details that are found in some other texts, and if necessary, these
topics can be supplemented by the instructor or reader, or covered in a subsequent text
and/or second semester course.

Audience
This text is intended primarily for readers who have not had any previous programming
experience; however, this does not preclude its use by others who have programmed
previously. It can serve as a text in an introductory programming course, as an introduction
to a second language in a practicum course, as a supplement in a course on the concepts of
programming languages, or as a self-study guide in either academe or industry. Although
no prior programming is assumed, it is recommended that readers have the equivalent of
an introduction to functions course that includes trigonometry which will help with
problem solving and understanding the examples presented in the text.

Acknowledgments
In addition to the reviewers of the first edition, the authors would like to thank Mark E.
Bollman of Albion College and James W. Chaffee of the University of Iowa for their
continued work on this edition. Also, the authors would like to acknowledge the students
of Illinois College who have read and used various sections of the first edition in the
classroom. On a personal note, James Streib would like to thank his wife Kimberly A.
Streib and son Daniel M. Streib. Takako Soma would like to thank her family and friends,
near and far.
Note that Java is a registered trademark of Oracle and/or its affiliates and that Windows
is a registered trademark of Microsoft Corporation in the United States and/or other
countries.

Feedback
The possibility of errors exist in any text, therefore any corrections, comments, or
suggestions are welcome and can be sent to the authors via the e-mail addresses below. In
addition to copies of the complete programs presented in the text, any significant
corrections can be found at the website below.
Preface ix

Website: http://www.jtstreib.com/GuideJavaProgramming.html

Illinois College James T. Streib


Jacksonville, IL, USA [email protected]
October 1, 2022 Takako Soma
[email protected]
Contents

0 Introduction to Computing Concepts 1


0.1 Introduction 1
0.2 Overview of Hardware and Software 1
0.2.1 Hardware 1
0.2.2 Software 2
0.2.3 History and Java 3
0.2.4 High-level Translation 3
0.3 Introduction ro Computational Thinking 5
0.4 Essentials of Software Design 7
0.4.1 Syntax, Semantics, and Errors 7
0.4.2 Design Methodology 8
0.4.2.1 Analysis 9
0.4.2.2 Design 9
0.4.2.3 Implementation 9
0.4.2.4 Maintenance 10
0.4.3 Tools and Techniques 10
0.4.3.1 Pseudocode 10
0.4.3.2 OOP and UML 11
0.4.3.3 Debugging 11
0.5 A Brief Look at Computer Ethics 12
0.6 Summary 13
0.7 Exercises (Items Marked with an * Have Solutions in Appendix E) 14

1 Variables, Input/Output, and Arithmetic 17


1.1 Introduction 17
1.2 Java Skeleton 16
1.3 ³+HOOR:RUOG´ 17
1.3.1 Text-based Output 17
1.3.2 GUI-based Output 18
1.4 Variables and Constants 19
1.5 Assignment Statements 23
1.6 Output 26
1.6.1 Text-based 26
1.6.2 GUI-based 30
1.7 Input 31
1.7.1 Text-based 31
1.7.2 GUI-based 34
1.8 Arithmetic Statements 36
1.8.1 Binary Operators 36
1.8.2 Precedence 38
1.8.3 Unary Operators 39
1.8.4 Incrementing 40

xi
xii Contents

1.8.5 Summing 41
1.8.6 Arithmetic Functions 42
1.9 Comments 43
1.10 Complete Program: Implementing a Simple Program 44
1.11 Summary 46
1.12 Exercises (Items Marked with an * Have Solutions in Appendix E) 47

2 Objects: An Introduction 51
2.1 Introduction 51
2.2 Classes and Objects 51
2.3 Public and Private Data Members 52
2.4 Value-Returning Methods 52
2.5 void Methods and Parameters 53
2.6 Creating Objects and Invoking Methods 54
2.7 Contour Diagrams 56
2.8 Constructors 62
2.9 Multiple Objects and Classes 66
2.10 Unified Modeling Language (UML) Class Diagrams 73
2.11 Complete Program: Implementing a Simple Class and
Client Program 75
2.12 Summary 77
2.13 Exercises (Items Marked with an * Have Solutions in
Appendix E) 78

3 Selection Structures 83
3.1 Introduction 83
3.2 If-Then Structure 83
3.3 If-Then-Else Structure 88
3.4 Nested If Structures 91
3.4.1 If-Then-Else-If Structure 91
3.4.2 If-Then-If Structure 94
3.4.3 Dangling Else Problem 96
3.5 Logical Operators 99
3.6 Case Structure 105
3.7 Complete Programs: Implementing Selection Structures 111
3.7.1 Simple Program 111
3.7.2 Program with Objects 114
3.8 Summary 116
3.9 Exercises (Items Marked with an * Have Solutions in Appendix E) 116

4 Iteration Structures 121


4.1 Introduction 121
4.2 Pretest Indefinite Loop Structure 121
4.2.1 Count-Controlled Indefinite Iteration Structure 122
4.2.2 Sentinel Controlled Loop 128
4.3 Posttest Indefinite Loop Structure 134
4.4 Definite Iteration Loop Structure 137
Contents xiii

4.5 Nested Iteration Structures 140


4.6 Potential Problems 141
4.7 Complete Programs: Implementing Iteration Structures 142
4.7.1 Simple Program 143
4.7.2 Program with Objects 145
4.8 Summary 150
4.9 Exercises (Items Marked with an * Have Solutions in Appendix E) 150

5 Objects: Revisited 155


5.1 Sending an Object to a Method 155
5.2 Returning an Object from a Method 158
5.3 Overloaded Constructors and Methods 161
5.3.1 Overloaded Constructors 161
5.3.2 Default Constructors 163
5.3.3 Overloaded Methods 164
5.4 Use of the Reserved Word this 165
5.5 Class Constants, Variables, and Methods 169
5.5.1 Local, Instance, and Class Constants 169
5.5.2 Local, Instance, and Class Variables 176
5.5.3 Class Methods 178
5.6 Complete Programs: Implementing Objects 180
5.6.1 Program Focusing on Overloaded Methods 180
5.6.2 Program Focusing on Class Data Members and Class
Methods 189
5.7 Summary 193
5.8 Exercises (Items Marked with an * Have Solutions in Appendix E) 193

6 Strings 203
6.1 Introduction 203
6.2 String Class 203
6.3 String Concatenation 204
6.4 Methods in String Class 206
6.4.1 The length Method 206
6.4.2 The indexOf Method 206
6.4.3 The substring Method 207
6.4.4 Comparison of Two String Objects 209
6.4.5 The equalsIgnoreCase Method 211
6.4.6 The charAt Method 212
6.5 The toString Method 213
6.6 Complete Program: Implementing String Objects 215
6.7 Summary 219
6.8 Exercises (Items Marked with an * Have Solutions in Appendix E) 219

7 Arrays 223
7.1 Introduction 223
7.2 Array Declaration 223
xiv Contents

7.3 Array Access 224


7.4 Input, Output, Simple Processing, and Methods 226
7.4.1 Input 226
7.4.2 Output 230
7.4.3 Simple Processing 230
7.4.4 Passing an Array to and from a Method 231
7.5 Reversing an Array 232
7.6 Searching an Array 237
7.6.1 Sequential Search 237
7.6.2 Binary Search 238
7.6.3 Elementary Analysis 240
7.7 Sorting an Array 241
7.7.1 Simplified Bubble Sort 241
7.7.2 Modified Bubble Sort 244
7.8 Two-Dimensional Arrays 245
7.8.1 Declaration, Creation, and Initialization 245
7.8.2 Input and Output 247
7.8.3 Processing Data 248
7.8.4 Passing a Two-Dimensional Array to and from a Method 251
7.8.5 Asymmetrical Two-Dimensional Arrays 253
7.9 Arrays of Objects 255
7.10 Complete Program: Implementing an Array 258
7.11 Summary 261
7.12 Exercises (Items Marked with an * Have Solutions in Appendix E) 262

8 Recursion 265
8.1 Introduction 265
8.2 The Power Function 265
8.3 Stack Frames 274
8.4 Fibonacci Numbers 277
8.5 Complete Program: Implementing Recursion 289
8.6 Summary 291
8.7 Exercises (Items Marked with an * Have Solutions in Appendix E) 291

9 Objects: Inheritance and Polymorphism 293


9.1 Inheritance 293
9.2 Protected Variables and Methods 303
9.3 Abstract Classes 304
9.4 Polymorphism 306
9.5 Complete Program: Implementing Inheritance and Polymorphism 310
9.6 Summary 315
9.7 Exercises (Items Marked with an * Have Solutions in Appendix E) 316

10 Elementary File Input and Output 321


10.1 Introduction 321
10.2 File Input 321
10.3 File Output 326
Contents xv

10.4 File Input and Output Using an Array 328


10.5 Specifying the File Location 332
10.6 Complete Programs: Implementing File Input and Output 334
10.6.1 Matrix Multiplication 334
10.6.2 Sorting Data in a File 336
10.7 Summary 338
10.8 Exercises (Items Marked with an * Have Solutions in Appendix E) 338

11 Bit Manipulation 341


11.1 Introduction 341
11.2 Simple Conversions 341
11.3 Declaration and Assignments 343
11.4 Bit-wise Logic Operations 344
11.5 Testing, Clearing, Setting, and Toggling 346
11.6 Shifting 348
11.7 Precedence 350
11.8 Complete Program: Implementing Bit-wise Operators 351
11.9 Summary 355
11.10 Exercises (Items Marked with an * Have Solutions in Appendix E) 355

12 Introduction to Parallel Processing Programming 356


12.1 Multiprossor Systems 359
12.2 Programming Multicore and SharedMemory Multiprocessor
Using Pyjama 360
12.2.1 Using Pyjama to Write Multithreaded Programs 360
12.2.2 ³Hello World´ 361
12.2.3 Sorting Building Blocks 363
12.3 Analysis 368
12.4 Complete Program: Implementing Paralle Inner Product 370
12.5 Summary 372
12.6 Exercises (Items Marked with an * Have Solutions in Appendix E) 372

Appendix A Explanation and Elaboration of Concepts in Chapter 1 375


A.1 6NHOWRQ3URJUDPDQG³+HOOR:RUOG³ 375
A.2 Text-base Output: print and println 376
A.3 Text-based Input 378
A.4 Overview of Java Packages 379
A.5 More on GUI-based Output and Input 380
A.6 Confirmation Dialog Boxes 383
A.7 Option Dialog Boxes 384

Appendix B Exceptions 387


B.1 Exception Class and Error Class 387
B.2 Handling an Exception 388
B.3 Throwing Exceptions and Multiple catch Blocks 391
B.4 Checked and Unchecked Exceptions 396
Another Random Scribd Document
with Unrelated Content
greatest joy and gladness, and surrounded St Francis in such a manner that
some perched on his head, some on his shoulders, some on his arms and
some on his legs, and some around his feet. His companions marvelled, but
St Francis, all joyful in his spirit, said to them—I see that it is pleasing to
our Lord that we live in this solitary mountain, since so much joy is shown
at our arrival by our little sisters and brothers, the birds.”
This incident in the legend of the saint illustrates one of the most lovable
traits in his character—the sense of religious fellowship which united him
to whatever claimed his attention in nature. The beasts of the earth, and the
birds of the air, fire and water, the wind, the sun, the moon and the clouds—
he felt the impress of the divine spirit in every one of them. In the happiest
and in the most trying hours of his life he was ever ready to recognise the
beneficence of the divine purpose in everything around him. It was this
attitude of mind which enabled him not to shrink when the red-hot iron was
drawn across his temple in the hope of saving his eye-sight. It was this
attitude of mind which inspired him to compose the Canticle of the Sun, a
hymn which in its simple framing and passionate utterances bears the stamp
of the religious fervour of a new era.
The personality and influence of St Francis have great attractions under
whatever aspect they be viewed. He is the representative of a new
development of Christianity—of the period when the bearings of Christian
teaching on the concerns of daily and domestic life were first realised, and
when the masses of the laity ceased to look upon Christianity as a cult, and
began to feel it as a living faith by which conduct could be regulated. It is in
this sense that Ruskin, speaking of St Francis, says that it was he who
taught men how to behave. By example chiefly. For the bearing of the man
who would be guided solely by Christian love and charity had an irresistible
charm for those who saw him, and the tidings of his influence, carried
beyond the confines of his district by enthusiastic followers, acted as the
breath by which latent emotional cravings were everywhere fanned into
ardent devotion to the needs of suffering mankind.
To his companions the Poverello of Assisi appeared as the true
representative of the Lord’s anointed, and it was owing to this that the
movement which he inaugurated had so great an influence on life, on
literature and on art. The measure of the man is not easy to recover. His
companions never tired of drawing parallels between him and Jesus of
Nazareth, and, as in the case of Jesus, a number of miracles wrought by him
were introduced into the descriptions of his life, which throw darkness
rather than light on his personality. But the influence of the man may well
appear miraculous, considering how instantaneous and far-reaching was the
impression which he produced—an impression to which history offers few
parallels. This influence is so marvellous that the historian who would show
it in the light of cause and effect must needs have a firm hold on the
sequence of events that led up to it, and on the prevalent attitude of mind in
the different strata of society that prepared it.
The influence of the Franciscan movement on literature and art has been
made the subject of a number of interesting inquiries. Ozanam was the first
to analyse it in its bearings on Italian poetry. The Canticle of the Sun
(Laudes Creaturarum) by St Francis, is among the earliest poems in the
vernacular, and it led to the composition of numerous poems and hymns.
Apparently St Francis in early days himself sang the songs of the
troubadours, and among his first converts was a troubadour who was
afterwards known as Fra Pacifico. Hence an element in the religious poems
of the Franciscans which reflects the poet’s delight in nature and the
beggar’s freedom from care. Many celebrated hymns were written by
Franciscans, among them the Dies Irae, first sung by Thomas of Celano,
and the Stabat Mater Dolorosa written by Jacopone of Todi, a famous and
prolific poet. As a companion to the Stabat Mater Dolorosa, the Hymn of
the Virgin at the Cross, Jacopone afterwards wrote the Stabat Mater
Speciosa, the Hymn of the Virgin at the cradle; the keynote of the one is
sorrow, the keynote of the other is joy.
The study of Ozanam on the influence of the Franciscans on Italian
literature might be extended to other countries. Some of the earliest and
most beautiful writings in Middle English were the outcome of Franciscan
influence. Wherever the friars gained a foothold they succeeded in
identifying themselves with popular and national interests, and the
Christianity which they preached was as a light by which the common
realities of life appeared more beautiful and more worthy of praise in
sermon and song.
In regard to art, Ruskin long ago drew attention to the spirit which the
friars infused into painting; his keen sense of beauty and his desire for
religious exaltation were soothed by no art so well as by that of the
Quattrocento. In Italian painting the friars inaugurated a new era. Since the
days when Byzantine artists had decorated churches and chapels with
mosaics, practically no attempt had been made to represent incidents of
Biblical history and saint legend in church. The friars were the first to
favour the idea of having the stories of religion set forth on a large scale in
effective and inexpensive frescoes. And compared to the artists of the
Byzantine School, these painters were animated by the health-giving breath
of a new kind of realism. To the Byzantine, as interpreted by his work,
dispassionateness appeared as an adjunct of holiness in the saint. The fresco
painter, on the contrary, did not hesitate in animating the saints with
passion, which appears as additional strength, since it is passion brought
well under control.
The Franciscan churches of Italy have recently been made the subject of
an inquiry by Thode, who enters also into the incidents of the saint’s life
which were there represented. In the choice of these incidents the painters
were apparently guided by the early accounts of the saint’s life, but there is
considerable diversity in the scenes which they chose for representation and
combined together into a series. The early accounts of St Francis include a
life written by Thomas of Celano between 1228 and 1229, which was
afterwards re-written; a life written by three of the companions of St
Francis, which was finished in 1246; and a life in which St Francis’s great
follower, Bonaventura, combined all that had previously been written of the
saint. It was completed in the year 1260.
But the development of the legend of St Francis did not stop here. The
Little Flowers of St Francis, which were put into writing in the course of
the fourteenth century, describe such incidents in the life of the saint as
appealed to popular fancy, set down in a popular form. The thread of
historical truth in this book is of the slenderest, and the incidents
ENTRANCE TO LA VERNA

as they stand cannot claim to have happened. And yet the Little Flowers, in
their bluntness and simplicity, have all the charm of an unreflective and
uncritical belief in the beauty of the new teaching. They give a true picture
of humble life in mediæval Italy and show us the early Franciscans in the
light in which they saw themselves. The book was widely read, and the first
part, which dealt with St Francis among his followers, was amplified by
accounts of the mad and saintly freaks of Fra Ginepro, and of the
steadfastness with which Fra Egidio kept to his resolve of living by the
labour of his hands. The influence of the Poverello of Assisi was, in fact,
felt by the highest and the lowest alike. While current fables made popular
heroes of him and his followers, Giotto at Assisi represented the decisive
incidents of his life in a series of paintings, which have been likened to an
epic, and Dante devoted an entire canto of the Paradiso to his praise. In the
Paradiso the praise of St Francis is sung by St Thomas Aquinas, the
greatest of the followers of St Dominic, while the praise of St Dominic is
sung by St Bonaventura, the most influential of Franciscans, a proof of the
bond which united the two orders in Dante’s mind. The jealousy which
afterwards estranged them was never as pronounced in Italy as north of the
Alps. In many churches the figures of St Francis and St Dominic still stand
side by side. And Andrea della Robbia, in a most charming relief in the
Piazza Santa Maria Novella at Florence, gave expression to the affection of
the two orders by representing their founders embracing as they meet.
And how shall we picture him in the flesh, the man who was so close to
the best side of the religion and the morality of his age? In the year 1222 St
Francis, attracted by the thought of St Benedict, went to stay at the ancient
monastery at Subiaco, and here, in memory of his visit, his portrait was
painted on the wall of a chapel which was completed before 1228. On this
picture St Francis is represented without the stigmata and without a halo.
He wears the penitent’s rough garb with a cord round his waist, and he is
designated simply as Frater Franciscus. The Poverello is seen full face. His
figure is slim, his hair and beard are crisp and fair, his face is long and thin.
In spite of a certain awkwardness, due no doubt to the painter, he has an
appearance of refinement and delicacy well in keeping with the stock from
which he had sprung. His large eyes and parted lips suggest the enthusiast;
his thin neck and slender hands belong to a physique which might well
contract phthisis. There are other early pictures of St Francis. But the great
painters who set forth his life’s history do not appear to have been directly
influenced by them. Thode has shown how, in some parts of Italy, a bearded
type of the saint is traditional, in others a beardless type. Sometimes he was
painted dark, sometimes fair, sometimes comely in figure, sometimes
emaciated. Even Giotto, judging by the two series of pictures he painted,
the one at Assisi, the other in the church of Santa Croce in Florence, had
before him different ideal types of the saint.
Were it not for the ravages of time, the convent at La Verna would
possess one of the early cycles of pictures representing the story of St
Francis. A chapel was erected in 1264 on the spot where St Francis received
the most holy stigmata, and Taddeo Gaddi, the godson and pupil of Giotto,
was summoned to decorate it. No trace of the work remains. Taddeo’s stay
at La Verna was however productive of other results. A youth from the
neighbouring Pratovecchio, Jacopo Landini, was sent to work under him,
and he afterwards went to Florence and gained considerable renown as
Jacopo del Casentino. In later life he returned to his native district, where
some paintings of his are extant. Vasari includes an account of him in his
Lives of the Painters, and he tells us that it was due to Jacopo that the
painters of Florence first combined together in a guild (compania e
fraternita) in 1350.
As it stands at present the retreat of La Verna is distinguished chiefly by
the large number of its altar-pieces in glazed terra cotta by the della
Robbias. Except in the museum at Florence there are nowhere so many fine
examples of their work to be found together. They are gifts for the most part
from distinguished Florentine families. They include a large altar-piece, on
which the Virgin is seen handing her girdle to St Thomas; a Transfiguration,
on a large scale, with the figures of the twelve Apostles standing below in
beautiful grouping and the most varied expression. There is a Nativity with
the figures of St Francis and St Anthony of Padua behind the Virgin and St
Joseph, and an Annunciation; both of these are of exquisite grace. All these
altar-pieces and other single figures, such as St Francis, are in the usual
style of blue and white. I find them variously attributed to Luca and to
Andrea della Robbia. In the gallery on the way to the chapel there is a large
Pietà in polychrome. The most beautiful, however, of all is a large altar-
piece of the Crucifixion, the sole decoration of the Chapel of the Stigmata.
Slowly we ascended the steep path which led up to the convent. We
passed under an archway and found ourselves before the entrance to the
main church. The site of La Verna was granted to St Francis by Count
Orlando of Chiusi in the year 1213; it was the only gift of a site ever
accepted by the saint, who held himself betrothed to poverty. Probably a
small church was erected under his direction; but when the fame spread of
his having here received the impress of the stigmata, a special interest
attached to the site. Pope Alexander IV. took the “Mons Alvernus” under his
protection; in 1260 a church was consecrated in the presence of
Bonaventura and six bishops; and a few years later the Chapel of the
Stigmata was built through the munificence of Count Simone of Battifolle.
The chief church is now a large one; it was begun in 1348, but it was not
completed till some time in the fifteenth century, when the whole settlement
of La Verna, the “Seraphicus Mons,” as it was called, had passed under the
protectorate of the Signory of Florence.
The churches at La Verna form part of a vast mass of buildings. We were
told that the convent affords accommodation for five hundred friars. As we
were about to enter the main church we met some of them walking in a
procession, two and two. They had been celebrating service in church, and
now they walked down the gallery to conclude it in the chapel, chanting as
they went along. We afterwards met them again coming out. There were
forty of them, vigorous men for the most part, wearing the rough brown
frock and cord, with sandals on their bare feet. It was difficult to tell at a
glance from what class they were drawn; certainly not from the higher and
more refined. They greatly differed as to age, and the older men had the
better appearance. On the whole they were not dignified in bearing, and in
person did not look as clean as they might have done.
We spent a long time in church, looking at the altar-piece and reading
what the guide-book to the Casentino of Beni had to say of La Verna. This
is the only guide-book to the district as far as I know. It was our constant
companion, but we found that it required close and repeated reading, for it
is a queer jumble of all kinds of information. We then wandered along the
gallery which bridges the abyss between the settlement and the isolated bit
of rock on which stands the Chapel of the Stigmata. With its dark panelling
and its one large altar-piece this chapel is a true place of rest. Its large della
Robbia represents the Crucifixion, with the figures of the Virgin, St John
the Baptist, St Jerome and St Francis standing and kneeling below. This
association of saints of later date with the characters of Scripture comes at
first as a shock to the historical mind; to the Middle Ages it appeared
natural. St Anthony of Padua, in a vision, saw the child Christ sitting on his
prayer-book. St Bernard, in a vision, saw the Virgin standing before him.
When these scenes came to be represented in art they assumed the form of
real incidents. And by a further development, St Francis and other holy men
and women of the Middle Ages were pictured in contemplation of the
Nativity, the Crucifixion and other decisive moments in Biblical history as
though they had been present at them in the flesh.
There were other sights to be seen at La Verna: the rocky chasm where
St Francis hurled aside the devil, and the Luoghi Santi, a number of grottoes
and rock-hewn chambers where the saint once lived. Visitors from all parts
of the world come to La Verna, and on Sundays they say there are crowds of
country people all eager for the sights. For myself, I was content with what
I had seen and glad to rest in the convent, where an old friar gave us wine
and water to drink. He chatted about the convent and about himself. How
long had he stayed there—forty years? Yes, quite that. Fifty? Quite likely, it
came to much the same thing. I had recently been reading the Life of St
Francis by Sabatier, a charming writer, who makes the joyful side of the
saint’s nature very real. The old friar remembered his stay at La Verna, but
he would not say much about him.
Then we sat outside under the huge beeches, as yet bare of foliage,
listening to the birds, which seemed as numerous and as tuneful as they
were seven hundred years ago. With the sun shining brilliantly we started
homewards to Bibbiena. The ascent of the Penna, and a walk over to Chiusi,
which lay below in a streak of blue mist, are expeditions I should wish to
make if I ever again visit the district.
IV

Camaldoli and St Romuald

“Qui è Romualdo
Qui son’ li frati miei che dentro il chiostro
Fermar li piedi e tennero il cuor saldo.”
(Par. 22, 49 ff.)

A day’s walking and we were removed to a very different atmosphere,


and to associations widely separated from those connected with the high
retreat of La Verna. A wide gulf divides the temper of a man like St Francis
from that of a St Romuald. Both are accepted saints of the Church, but
while the one taught men how to be guided by love through the example of
his own gentleness and forbearance, the other emphatically denounced
those who interpreted the religious life differently from himself. St Francis
is the gentle soul of the thirteenth century, that yields that it may conquer;
St Romuald is the rough-and-ready champion of the tenth century, ever
ready to start up in defence of Mother Church.
Camaldoli is a pearl among the many pearls of the Casentino. I have
seen it in spring-time only; the Italians tell you that it is even more beautiful
in summer, when its shady chestnut groves and dark pine forest give a sense
of restored energy and renewed vigour to those who come here from the
arid plains of Tuscany and the blinding heat of the streets of Florence.
Camaldoli may be conveniently reached by a good driving road or by paths
from the east or the west. We decided on striking into the former of these
two paths, and on a genial day we bid adieu to Bibbiena, descending first
and then mounting with the driving road which afterwards followed an even
ridge for several miles.
The views from this ridge were extensive and varied. In the distance the
panorama of the hills was slowly unfolding. Nearer at hand our attention
was caught now by a peach-tree with its purple blossoms, then by a cherry-
tree, its downy white branches swaying with the breeze. We passed several
country-houses, always somewhat removed from the road and always
flanked by a group of dark cypresses, which sometimes extended into an
avenue down the slope of the hill. These old country-houses of Tuscany
consist of a dwelling-house and a farm, which sometimes stand a little way
apart, the dwelling-house marked by a look of greater trimness and reserve;
sometimes they are brought closer together with an increased look of
orderliness to the one and of homeliness to the other. Both houses are built
of stone,

CAMALDOLI (CASENTINO)

usually two storeys high. And both are covered with red rough-tiled roofs
that lie flat and broad over the entire dwelling and project on all sides into
wide eaves.
We passed through Camprena, a posto which also had its peculiarity. The
houses neither fronted the street nor stood at right angles to it, a want of
arrangement not accounted for by any apparent irregularity of the ground.
Such an Italian village has none of the neat clustering of its English or
German namesake. There is no village church standing aloof to watch over
the entrance and exit from life of suffering humanity; no village green with
ancient oak suggesting a living protection to rights and liberties; no well-
appointed inn betokening the love of an evening’s good cheer. The houses
have come together anyhow, and few are the attempts made to brighten a
portico or a window with a row of flower-pots. Sometimes the house itself
is washed over with pink or yellow, but there is never a scrap of flower-
garden to add a bright spot of colour to its surroundings.
Further along the road lay Soci, a place which went through stormy
experiences in the early Middle Ages. Remains of its own castle walls and
remains of the castles of Gressa and Marciano, which frown from heights
above and beyond it, recall the times when might made havoc with right. At
one time the Prince Bishop of Arezzo owned the place and made it over to
the monks of Camaldoli. But, apparently on account of its insecurity, they
parted with it to one of the Counts Guidi in exchange for rights of
ownership at Bagno on the further side of the Apennines. However, the
Guidi did not long remain in possession of the castle; they lost it to their
enemies, the Tarlati of Pietramala.
Soci is now a growing centre of industry, and boasts of several factories.
The high chimney of one of these figures is the attractive feature on the
local picture post card. The thought often arises in these days at what a
terrible cost to itself mankind is securing greater cheapness in goods—
raising the standard of comfort, as economists put it; the thought was
brought home in this outlying district. For the men and women we met in
other parts of the district were robust in health and decently, if poorly, clad;
the children were chubby, well-fed and full of buoyancy. But in places like
Soci a blight seemed to have fallen on mankind. Men and women, girls and
boys, all had the same look of mixed listlessness and craving, and the
children were pale and neglected. No doubt here, as elsewhere, the people
who flocked to the factories were impatient of the restraints and the penury
of home; they escaped from the toil of home, but they did so at the cost of
the home’s regularity of habit. Stranded in a strange place, bound by no
responsibilities but those they chose to recognise, these men and women
soon fell into irregular ways and formed illicit connections, with a
consequent loss of physique to themselves and a deterioration of the race in
a couple of generations.
Beyond Soci the mountains began to draw closer together. The road
followed the river Archiano, which flowed in a narrower bed and assumed
the character of a torrent. Only the land that was near the river was brought
under cultivation. The slopes above were covered with a thin scrub of
stunted oaks bearing only the sere foliage of last year’s growth. These
mountains were chiefly of a brown mud-rock that had crumbled away along
the water-courses, or else, undermined by them, had fallen in masses of soft
earth, forming the gentler slopes. Side-valleys opened and closed as we
passed onwards. The characteristics of the plain were disappearing more
and more. We were entering the region of the Apennines.
At one point of the road we were doubtful if we should leave the valley,
and seeing a man under a hay-stack munching bread and cheese we
consulted him. But his look was interested, and he was so positive that the
diverging path not being ours, we should never reach Camaldoli unless we
consented to his guidance, that we became equally positive the map should
be our only guide. We cut short further parleying by saying that we could
but return if we missed the way altogether. Of this there was no chance. A
short distance further and we sighted Serravalle, towering high on a steep
eminence that fronted all quarters. On one side it commanded the bend in
the road that led onwards across the Apennines into Romagna; on the other
it stood well above a dip in the hills, and overlooked the side-valley down
which the Fosso of Camaldoli flowed to join the Archiano. The mountain
streams throughout the Casentino are spoken of as fossi, though not
generally so designated on the map—a peculiar use of the word which
suggests affinity to the northern fos rather than to the Latin fossa. In sight of
Serravalle we sat for a while and feasted on our usual lunch of bread, eggs
and wine. After that we followed the stream for a time, and then, parting
company with it, we began the ascent up the steep winding slope.
On a clear day such as this, the steeper the ascent the more striking the
observation how the nearer mountains sink into insignificance before the
higher ranges that rise on the skyline beyond. Under the dome of blue, with
its few sailing clouds, the air was of absolute transparency, and every detail
of the level we had left, every detail of the level to which we were attaining,
stood out in shining clearness. Each special portion of the world above,
below, around had its distinguishing feature, from the flock of sheep
grazing by the stream below to the man carrying stakes up the opposite
slope, and to the dark birds hanging over Serravalle. But the observing
faculty soon wearied with watching for new impressions. With the brighter
sunshine, the keener air and the more fragrant vegetation of the height, a
dreamy consciousness took possession of the mind—a consciousness of
being nearer heaven—heaven, a fictitious limitation of space indeed, but a
limitation the thought of which brought one’s own concerns into an
amended relation to those of the world generally. After all, it is by drawing
imaginary circles that the mind attains to a conception of relative size. The
greater the height, the wider the outlook; the stronger the consciousness of
the world we possess not, the clearer the conception of that part of the
world which we have made our own.
Higher up patches of snow lay here and there on the shady side of the
path. The shrubs and plants became stunted and nipped, with the exception
of the flowering giant spurge that stood up from the stony ground vigorous
and brilliantly decorative. We passed a cluster of dwellings, built of rock
and founded on rock, grey and weather-worn, quite Alpine in character,
where the necessities of life are wrung from nature in a close hand-to-hand
fight. For a long time our path was rocky and uneven and lay between
thorny undergrowth. Then it led down at a gentle gradient and drew nearer
to the bed of the Fosso. Within a few minutes’ walk the character of the
surroundings entirely changed. From a stony wilderness we had passed into
an enchanted grove. The slopes lost their steepness, and the ground lost its
bareness. We walked under high chestnuts along a moss-grown path that
was soft to the tread, and then over a carpet of verdure bright with spring
flowers, which recalled the emerald meadow dotted with shining flowers
over which angels lead mortals to heaven in the painting of Fra Angelico. It
was late in the afternoon, and the slanting sun-rays made golden lights on
the trunks of the trees and set aglow the patches of primroses. The call of
the cuckoo sounded at intervals, and there was the distant warbling of many
woodland birds. One wished for the path to lengthen out indefinitely; all too
soon the massive settlement of Camaldoli, set against a forest of pines,
closed in the head of the valley.
There is a graceful legend concerning a monk (I forget his name) who
was one day tempted to stray from the path of life; he was sore perplexed in
his mind by the words of the Psalmist, “A thousand years in God’s sight are
but as yesterday.” How could time, that uniform flow “unaffected by the
speed or the motion of material things,” be robbed of the conception of its
length? How could time ever cease to exist to one who was endowed with
consciousness?
To the monk, as to many another, failing to see was failing to believe.
With a heavy heart he wandered forth into the convent garden carrying his
problem with him. Quod erat demonstrandum: would a greater intercede in
his behalf? Time slipped by unawares. It was late at night when he regained
the convent gate, but those who opened in answer to his call knew him not.
His talk, his appearance, his manner were strange to them, and yet there
was that in him which commanded attention—he was like as well as unlike.
They admitted him, and after a while the memory of an old, old story came
to one of the monks who listened to him—how long ago a member of the
fraternity had been troubled in his mind and had wandered forth and never
returned, but it had always been believed by some that he was still among
the living. After much seeking his name was found in an old convent
register. It was the name of the monk who had returned after a thousand
years. Then they saw him as one of themselves. The miracle was
accomplished. And the monk understood that eternities which are the
products of human conception hold good for man only. God’s eternities
may be different. It is said that a short time afterwards he passed away from
life in peace.
And would it be very different if that monk had been one of the
companions of St Romuald here at Camaldoli, nay not quite a thousand, just
nine hundred years ago? If he came back now would he know these
surroundings for those he had left? Would he feel it the same world as it
was then, ruled by the same ideas—that a simple life is conducive to
elevation of mind, and that the air of the heights and the pure water of
undefiled springs make the body strong to withstand evil? And would they
too know him as one of themselves, those venerable monks, bent with age
and dignified in bearing, who were approaching the monastery along the
upper road as we neared it along the lower? Their woollen robes of many
folds were white, such as Romuald in his dream beheld his companions
wearing, when, like Jacob, he saw a ladder set up on the earth and reaching
up to heaven, and his monks were the angels ascending and descending on
it. These men had drawn their hoods over their heads, and over them they
wore large, wide-brimmed Tuscan straw hats. They were neatly stockinged
and shoed, and most of them had flowing beards and a complexion that
reminded one of the delicate tints of crumpled rose-leaves. To us they were
figures of a distant past, and it was wonderful to think that if one of the old
monks of Romuald’s time were to come among them, the great difference in
them would be the first thing to strike him.
The monastic settlement of Camaldoli consisted of a monastery placed
near a famous spring, Fonte Buona, and of a hermitage, the Eremo, which
was situated further up among the mountains. One of the reasons of
Romuald’s success lay in his refounding hermit life on a new basis—it is
one mark of a genius to turn existing tendencies to new and profitable
account. In the monastery all were made welcome; to the hermitage those
were promoted whose temper proved their fitness for a solitary life. At the
present time only a small wing of the monastery was inhabited by the
monks, who rented it from the Government, the vast conglomerate of
buildings having been turned into a hotel. But the hermitage up among the
mountains was still entirely occupied by them. Up there lived those who
were able to endure the privations of hermit life; up there they remained till,
weakened by old age, they came down to the monastery to be tended in
sickness, and after death their mortal remains were carried back to the
Eremo to be buried in the ancient burial-ground.
The account of the life of St Romuald, which was written by St Peter
Damian, who belonged to the following generation, gives curious glimpses
of the attitude of men’s minds in a far-distant past. It is never easy to
transport one’s self to the moral and ethical standard of another age, for the
actions of the men who then stirred up the emotions and aroused
enthusiasm can be very differently interpreted; in one aspect they are
heroes, in another they are faddists. It is in this respect with Romuald as
with the holy man of another age, Diogenes the Cynic. Looked at from one
point of view, the courage with which Diogenes acted up to his convictions,
the cheerfulness with which he bore the hardships of slavery, and the
simplicity of life which he affected, bear the stamp of grandeur. Looked at
from another side, he is a man of oddities and eccentricities. Prompted in a
like direction, Romuald launched forth against misdeeds, discarded every
comfort, and commanded respect from the most powerful. But his
behaviour also appears absurd if we fix our minds on the way he courted
dirt, weakened himself by fasting, and wore himself out by imaginary
conflicts with the devil. And there are other points of similarity between the
cynic of classical antiquity and the saint of early Christianity. The cynic
called himself a citizen of the world, and the word cosmopolitan is held to
be his invention; while the saint exaggerated the power of his efforts so
vastly that “he looked forward to the time when the whole world would be
transformed into a hermitage, and the mass of the nations united in one
monastic order.” Both men were praised for their undisturbed serenity under
tribulation, and both in unabated vigour reached the extreme limits of old
age.
Let us look more closely into the account of Romuald’s life, an account
written by a great man and telling of a great man is surely worth analysis.
Romuald was a native of Ravenna, and was born early in the tenth century
of a noble family. As a youth he was witness to how his father killed a
relative; and he went to St Apollinare in Classe, to expiate the crime by
forty days’ penance. The church of St Apollinare is little changed from what
it was then, and visitors to Ravenna will recall with delight the simple
proportions of the roomy basilica, and its brilliant mosaics, with St
Apollinare preaching with his flock of sheep around him. A monk of the
church proposed that Romuald should join the fraternity, and the young
man agreed to do so, after spending a night in church, when St Apollinare
himself appeared as the monk had foretold—a proof, as Romuald declared
and as Peter Damian believed, that the saint really lay buried here. But
Romuald’s innate spirit of restlessness and want of consideration for the
shortcomings of others cut short his stay after three years’ noviciate. The
monks would lie in bed when it was time to be in church singing, and
Romuald, finding the church closed, sang in the dormitory. The monks
decided to rid themselves of the inconvenient enthusiast by throwing him
out of the window. Romuald, however, escaped to the woods, and there he
found a companion to his heart’s desire in the unlearned but ardent Marinus.
This holy hermit chanted through the entire psalter every day; he would
repeat twenty verses under one tree, twenty under the next, and so on till his
task was accomplished. Romuald joined him in his exercises, and mistakes
in his performance were punished by a blow on the ear from the hermit’s
staff. When his hearing became impaired in consequence, he turned his
other ear for castigation, and his stern master was touched. On three days of
the week the two hermits lived on a bit of bread and a handful of beans; on
the other four, crushed corn, pulmentum, constituted their food. Their
conduct was evidently considered unexceptionable, and in 978 when, in
consequence of an insurrection in Venice, Count Petro Orseolo, who had
headed it, was advised to seek refuge in a convent, Romuald and Marinus
were among those chosen to escort him to a monastery near Perpignan in
the south of France. There they resumed the old life, and were credited with
great holiness. Romuald’s fame increased owing to incidents such as this. A
lord of the neighbourhood, impeto barbarico, stole a cow from a peasant.
The peasant begged Romuald to ask for the cow, but the lord laughed his
request to scorn; the cow was roasted for the feast. However, the holy man’s
interference was not wasted. When the lord came to eat of the cow, a bit of
meat stuck in his throat and he died a wretched death. No wonder that the
people of the neighbourhood, when they heard that Romuald was about to
leave for Italy, as they could not retain him, decided to kill him so as at least
to secure his corpse. It was a time when relics, especially on the further side
of the Alps, commanded a high price in the market. Kings and emperors
gave gold and jewels in exchange for them, ecclesiastics of the higher
grades did not hesitate from stealing where they could not procure them
otherwise. And the relics did not lose by being transferred; on the contrary,
their wonder-working properties if anything increased. Romuald, however,
was apprised of the country folk’s intention, and knew how to meet it. He
rapidly shaved his head, and when they came, intending to kill him, they
found him eating immoderately. This was contrary to all accepted ideas of
saintliness; they thought he had gone mad and went away. The holy man
was left to depart in peace for Italy, where he found a new work awaiting
him. His father was about to leave the convent he had entered. This had to
be prevented. Romuald fastened his father’s feet in stocks, loaded him with
chains and whipped him till the old man’s senses returned. Romuald’s
career as a reformer now began, but, as his biographer says, “the zeal was
so great that glowed in this man’s breast that he was never satisfied with
what he had accomplished, and ever turned to new undertakings.”
Thus we find him at one time dwelling in a solitary cell in the marshes,
where, like St Guthlac in the fens of Lincolnshire, he was endlessly worried
through the lawless agency of bad spirits. After that, thanks to the
protection of Ugo, margrave of Tuscany, he collected about him a number
of monks at Bagno, in Romagna. But he so incensed them by sending
money to the relief of a distant monastery which had been consumed by fire
that he had to flee before their rage. Some years later, Romuald became for
a time abbot at St Apollinare in Classe, where he had stayed in his youth.
The Emperor Otto III., when he crossed the Alps in 996, heard that this
monastery was going to ruin, and he persuaded Romuald to reform the
monks. The influence which Romuald exerted on the melancholy young
emperor is full of interesting particulars. Otto went on a pilgrimage on foot
from Monte Gargano to Rome, and he spent some time with the hermit
Nilus, who was working for the reform of religious life in southern Italy
along lines similar to those Romuald was following in the north. Finally,
Otto spent forty days as a penitent in the convent at Ravenna, and was
almost persuaded by Romuald to become a monk. Romuald’s stay as abbot
at Classe was not, however, of long duration. He soon came and laid his
crozier at the emperor’s feet; an abbot’s life was not what he desired. His
zeal had taken another direction. He was fired by the thought of restoring
hermit life on the model of what had existed in Egypt, and he travelled
about from place to place collecting together wandering monks, the
gyrovagi, whom St Benedict had denounced as evil. He arranged that they
should dwell together, and join in the observance of certain rules.
This restoration of monastic life was part of a wider scheme. Reference
has been made to the growth of simony, both among laymen and
ecclesiastics. The evil had assumed such proportions towards the close of
the tenth century that the prestige of the Church was seriously jeopardised.
It was a critical epoch, and all depended on exposing the cause of the evil
and on stirring men’s consciences with regard to it. Romuald came forward
and openly declared that simony was the most damnable heresy, and that no
one who had entered the Church for money could hope for salvation unless
he gave up his benefice and became a layman. Peter Damian was of opinion
that, while no one acted directly in compliance with this request, the stir
which Romuald made was great. More than once he was in danger of his
life, and the experiences through which he went are full of interesting
particulars. At one time he lived for seven years as a hermit, and came back,
his body shrivelled, weather-stained and of the colour of a newt. But his
cutting himself off from the society of his fellows apparently led to many
conversions. At another time he was fired by the wish to take a part in
evangelising Hungary. Among the monks he had come across was a son of
the Prince of Hungary. But it was not to be. When Romuald and his
companions had gone some way on their journey, sickness overtook them,
and sickness returned to the party whenever it attempted to proceed. There
was nothing left to do but give up the undertaking and return to Italy.
Romuald’s fame was at its height when the Emperor Heinrich II. crossed
the Alps in 1022. So much was he moved by Romuald that he expressed the
wish that his soul were in the saint’s body. Romuald’s appearance at the
time was peculiar. Hoary, unkempt and unwashed, he came to court wearing
a dirty, shaggy skin. The Germans crowded round in the hope of snatching a
few hairs from it, which they wished to preserve as relics.
Romuald first came to Camaldoli about the year 1018. It has been
affirmed and denied that the site of the monastery was a gift to him from a
certain Count Maldolo, and that the name Camaldoli represents the words
Casa Malduli. The saint never stayed here long, and he died away from
here in his hermit’s cell at Val de Castro in 1027. But the routine of life at
Camaldoli was held to represent his aspirations, and Camaldoli gave its
name to all the monasteries which Romuald had founded. These were never
numerous. The order did not spread much beyond Italy and the south of
France. But within these limits it exerted considerable influence.
And thus attended by thoughts of the enthusiast who laid the foundations
of this vast establishment so many hundreds of years ago, we entered the
building by a long arched stone passage, which led up from the garden
without to the courtyard within. This courtyard is said to date from the tenth
century; I have rarely seen one more impressive through the stern simplicity
and perfect balance of its proportions. It is built throughout of the same
grey stone, and there is little attempt at ornamentation. Pillars with slightly
swelled shafts and simple capitals support round arches which extend round
the four sides of a paved court. In the centre of this court stands a fountain
with an unceasing flow of water. Passages, staircases and narrow corridors
lead off in different directions. Surely there could be nothing more suited to
the solitary side of one’s nature than to sit on one of the huge logs of wood
that lay on one side of the court, listening to the flow of the water and
watching the clouds that floated across the opening above. Now and again
there was the sound of voices and of footsteps coming and going in the far
distance. A man carried faggots across the court, a woman came to wash
lettuces at the fountain—living figures that moved in the round of duty and
seemed to emphasise the old-world solitude of the place. There is no greater
solitude than an open-air solitude from which the life of nature is excluded.
And within these walls there was no sign of animal or vegetable life—
nothing to remind one of the stirring of the sap or the beating of a pulse,
except that of which one was conscious of in one’s self.
That night we had the vast hotel of Camaldoli to ourselves. In the
springtime there are few visitors. We ate and slept in some rooms off the
COURTYARD OF CAMALDOLI

ancient courtyard. We wandered into the roomy church. One of the old
monks had died that afternoon, and prayers were being offered for his
salvation. We met the bier as it was carried out from the church.
Like other monasteries, Camaldoli has experienced many vicissitudes in
times of war and in times of peace. Throughout the Middle Ages it
remained a famous goal for pilgrimages, and its woodland air and mountain
freshness made it a favourite health resort. The converts to the order were at
first devoted to outdoor pursuits—the hermits in their little gardens tended
plants that were used for making drugs, and the monks were devoted to the
culture of the forests. Later, they contracted a taste for learning, and a
famous library was collected, chiefly by Ambrogio Traversari, who took an
important place in the early Italian Renaissance. Of this intellectual life no
trace remains. The books were scattered at the beginning of this century.
Some are at Poppi, others are at Florence, and the love of letters is dead.
But with the older achievements time has dealt more sparingly. A pharmacy
still makes part of the settlement, and the surrounding forest retains the
fame of being one of the finest in Europe. When the Government
appropriated Camaldoli, the traditions of the monks regarding the
cultivation of the trees were carried on, and Vallombrosa, the monastery on
the further side of the Pratomagno, was turned into a school of forestry. All
the forests throughout the district were placed under its care, and thus the
great fir trees, the abete of Camaldoli, its chestnut groves, and its beech and
oak forests have preserved some of their old grandeur.

LANDMARK OF
CAMALDOLI

You might also like