Fundamentals Of Java Programming Mitsunori Ogihara instant download
Fundamentals Of Java Programming Mitsunori Ogihara instant download
Ogihara download
https://ebookbell.com/product/fundamentals-of-java-programming-
mitsunori-ogihara-59047274
https://ebookbell.com/product/fundamentals-of-java-programming-
ogihara-mitsunori-21896840
https://ebookbell.com/product/learn-java-17-programming-learn-the-
fundamentals-of-java-programming-with-this-updated-guide-with-the-
latest-features-2nd-ed-2nd-edition-nick-samoylov-44467076
https://ebookbell.com/product/java-17-for-absolute-beginners-learn-
the-fundamentals-of-java-programming-2nd-edition-iuliana-
cosmina-48643530
https://ebookbell.com/product/java-projects-learn-the-fundamentals-of-
java-11-programming-by-building-industry-grade-practical-projects-2nd-
edition-peter-verhas-22964872
Java Projects Learn The Fundamentals Of Java 11 Programming By
Building Industry Grade Practical Projects 2nd Edition Verhas
https://ebookbell.com/product/java-projects-learn-the-fundamentals-of-
java-11-programming-by-building-industry-grade-practical-projects-2nd-
edition-verhas-55588322
https://ebookbell.com/product/java-for-beginners-a-complete-guide-to-
learn-the-fundamentals-of-java-and-start-programming-today-megane-
noel-47526100
https://ebookbell.com/product/fundamentals-of-java-4th-edition-
kenneth-lambert-martin-osborne-4336886
https://ebookbell.com/product/fundamentals-of-computer-science-using-
java-1st-edition-david-hughes-1021582
https://ebookbell.com/product/fundamentals-of-computer-graphics-with-
java-opengl-and-jogl-david-j-eck-50195618
Mitsunori Ogihara
Fundamentals
of Java
Programming
Fundamentals of Java Programming
Mitsunori Ogihara
Fundamentals of Java
Programming
123
Mitsunori Ogihara
Department of Computer Science
University of Miami
Miami, FL, USA
This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
To my family
Preface
This book was born from the desire of having an introductory Java programming textbook whose
contents can be covered in one semester. The book was written with two types of audience in mind:
those who intend to major in computer science and those who want to get a glimpse of computer
programming. The book does not cover graphical user interfaces or the materials that are taught in a
data structure course. The book very quickly surveys the Java Collection Framework and the generics
in the penultimate chapter. The book also covers the concepts of online and recursive algorithms in
the last chapter. The instructors who choose to use this textbook are free to skip these chapters if
there is no sufficient time. Except for the code examples that receive parameters from the command
line, the code examples can be compiled and run in a command-line environment as well as in IDEs.
To execute those code examples in an IDE, the user must follow the step of provide args before
execution. The code examples appearing in the book have very few comments, since the actions of
the code are explained in the prose. The code examples with extensive comments are available for the
publisher. There are PDF lecture slides accompanying the book. They are prepared using the Beamer
environment of LATEX. The source codes of the lecture slides may be available through the publisher.
Acknowledgements I would like to take this opportunity to thank those who helped me in
writing this book: Paul Drougas (Springer), Victor Milenkovic (University of Miami), Ted Pawlicki
(University of Rochester), Ken Regan (University at Buffalo), Geoff Sutcliffe (University of Miami),
and Osamu Watanabe (Tokyo Institute of Technology). Huge thanks go to my daughter Ellen, who
painstakingly read through the draft and provided constructive criticisms.
vii
Contents
1 “Hello, World!” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 The Programming Environment for Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1 The Java Virtual Machine (JVM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.2 Changing Folders in a Command Line Interface . . . . . . . . . . . . . . . . . . . . . . 4
1.1.3 Source Codes, Bytecodes, and Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 The First Program, “Hello, World!” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2.1 Methods and Their Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.2 System.out.println and System.out.print . . . . . . . . . . . . . . . . 10
1.2.3 Spacing in the Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.2.4 Commenting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.2.5 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.3 Using Multiple Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3.1 System.out.println and System.out.print (Reprise) . . . . . . . 15
1.3.2 Printing Multiple-Line Texts on the Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.3.3 Escaping Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.3.4 Printing Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2 Using Data for Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.1 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.1.1 Data and Their Taxonomy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.1.2 Number Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.1.3 Variable Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.1.4 Assigning Values to Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.2 The Primitive Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.3 Using Variables for Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.3.1 Quarterbacks Program (Reprise) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.3.2 Number Arithmetics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.3.3 Computing the Body-Mass Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2.3.4 Sum of Integers from 1 to 100 à la Gauss . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.3.5 Simplified Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.4 An Introduction to the String Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.4.1 The String Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.4.2 String Concatenation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
ix
x Contents
Part II Loops
7 For-Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
7.1 Using For-Loops for Repetition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
7.2 Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
7.2.1 Simple Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
7.2.2 Iteration with an Auxiliary Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
7.3 Double For-Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
7.4 Computing the Maximum and Minimum in a Series of Numbers . . . . . . . . . . . . . . . . 193
7.5 A Betting Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
7.5.1 For-Loops with Skipped Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
7.5.2 The Statements continue and break . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
7.6 Computing the Fibonacci Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
8 Formatted Printing Using printf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
8.1 General Rules for printf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
8.2 Formatted Printing of String Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
8.3 Formatted Printing of Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Contents xi
12 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
12.1 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
12.1.1 The Structure of an Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
12.1.2 Computing the Number of Occurrences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
12.1.3 ArrayIndexOutOfBoundsException . . . . . . . . . . . . . . . . . . . . . . . . . 303
12.2 Relative Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
12.2.1 The Concept of Relative Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
12.2.2 Calculating the BMI for a Range of Weight Values . . . . . . . . . . . . . . . . . . . . 306
12.2.3 Counting the Occurrences of Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
12.3 Arrays of boolean Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
12.4 Using Multiple Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
12.5 String Methods That Return an Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
xii Contents
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
List of Figures
xv
xvi List of Figures
Fig. 13.8 The concept of a array with capacity and size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Fig. 19.1 The value passing that occurs during the computation of the factorial (part 1) . . 495
Fig. 19.2 The value passing that occurs during the computation of the factorial (part 2) . . 495
Fig. 19.3 The value passing that occurs during the computation of the factorial (part 3) . . 495
Fig. 19.4 The value passing that occurs during the computation of the factorial (part 4) . . 495
Fig. 19.5 The value passing that occurs during the computation of the factorial (part 5) . . 495
Fig. 19.6 The value passing that occurs during the computation of the factorial (part 6) . . 496
Fig. 19.7 The value passing that occurs during the computation of the factorial (part 7) . . 496
Fig. 19.8 The value passing that occurs during the computation of the factorial (part 8) . . 496
Fig. 19.9 The value passing that occurs during the computation of the factorial (part 9) . . 496
Fig. 19.10 The value passing that occurs during the computation of the factorial (part 10) . 496
Fig. 19.11 The value passing that occurs during the computation of the factorial (part 11) . 497
Fig. 19.12 An example of the tower of Hanoi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Fig. 19.13 The solution to a small Tower of Hanoi problem . . . . . . . . . . . . . . . . . . . . . . . . . . 502
List of Tables
Table 10.1 The output generated by the three examples of switch . . . . . . . . . . . . . . . . . . . 246
xvii
Part I
Programming Basics
“Hello, World!”
1
Java is one of the most popular programming languages. It is a descendant of the programming
language C and is much related to C++. Java, like C++, embodies the concept of object-oriented
programming, which allows a programmer to define a type of data with its permissible set of
operations.
To execute a Java program on a machine, the machine needs an installation of the Java Running
Environment (JRE). A major part of JRE is the Java Virtual Machine (JVM). JVM creates an
environment where Java programs interact with the hardware.
A programmer creates a Java program by writing its source code. A source code is a text file that
describes the program according to the syntax of Java and has the file name extension .java. An
executable Java program generated from a source code is called Java bytecode, and has the file
name extension .class. To generate a Java program from a source code, the machine needs an
extension of JRE called the Java Development Kit (JDK) (see Fig. 1.1).
The Java language that comes with JDK consists of two parts. The first part, called java.lang,
is an essential component of Java. The second part is a collection of source codes that can be selected
and added to the Java program being written.
To write and edit a Java source code, a text editor is needed. Some editors understand the syntax of
Java and offer a variety of assistance. Popular text editors, which can be used for editing general text,
include: vim, emacs, and sublime.
The process of generating Java bytecode from a Java source code is called compilation. A primitive
way to compile a Java source code is to execute a compilation command in a command line interface.
Modern computers usually come with command line interfaces. For example, Mac OSX has Terminal
and Windows has cmd. There are other downloadable command line interfaces. A command line
interface is a program that interacts with the user on a text screen (see Fig. 1.2). The user types,
according to the syntax of the command line interface, a character sequence representing an action
he/she wishes to take. This sequence is called a command or a command line. On the interface screen,
the characters that the user types appear (or “echo”) as they are being typed. After completing the
command, the user hits the return key. The command line interface then attempts to parse the entered
Operating
System
Operating System
Layer
Hardware
Hardware Program
Programs Layer
Hardware
command according to its syntax. If the command is syntactically correct, the interface executes the
action represented by the command. When the action occurs, some characters may appear on the
screen after the command line. If there are many such characters, the text screen scrolls down to show
however many characters will fit on the screen, starting with the most recent. If the command is not
syntactically correct, the command line interface prints an error message. To inform the user that it is
ready to accept a new command, the command line interface prints a special sequence of characters,
called prompt, e.g., the “percent” symbol % followed by one white space, or the “greater than” symbol
>. Table 1.1 is a select list of commands.
An interactive development environment (IDE) is a program that combines a program editor and a
command line interface with many additional features that make it easy to write (in particular, large)
computer programs (see Fig. 1.3). The most famous IDEs for Java are Eclipse and Netbeans.
A command line interface (such as the program Finder for Mac and the program Folder for Windows)
works in one specific file folder. The specific folder is called the working folder (or the working
directory). In Finder and Folder, switching to a different folder is done by clicking icons. In a
1.1 The Programming Environment for Java 5
Table 1.1 A short list of commands available in the Terminal programs for Mac OSX and Linux, as well as their
counterparts in the Windows cmd
Terminal cmd Function
(Mac OSX/Linux) (Windows)
cd FOLDER cd FOLDER Change folder to FOLDER
cd cd Change to the home folder
cd .. cd .. Change to the parent folder
pwd chdir Print the working folder
ls dir Listing of all files in the folder
ls FILE ls FILE Listing of FILE in the folder
rm FILE del FILE Remove the file FILE
rmdir FOLDER del FOLDER Remove the folder FOLDER (must be empty)
mv FILE1 FILE2 move FILE1 FILE2 Rename FILE1 to FILE2
cp FILE1 FILE2 copy FILE1 FILE2 Copy FILE1 to FILE2
mkdir FOLDER mkdir FOLDER Create the folder FOLDER
cat FILE type FILE Show the contents of FILE
more FILE more FILE Show the contents of FILE in chunks
command line interface, this switch is made by typing a special command. The name of the command
is cd (which stands for “change directory”). The syntax of cd is:
cd FOLDER_PATH
6 1 “Hello, World!”
Here, FOLDER_PATH specifies how to get to the target folder from the working folder. In Chap. 15,
we study the general concept of file paths.
The folder moves are composed of two basic moves: moving to one of the folders that belong to
the present folder or moving to the parent (that is, the folder that the working folder belongs to as a
subfolder). To move to a child folder, the path that is specified is this child folder’s name. To move to
the parent, the path that is specified is .. (i.e., two periods).
It is possible to combine successive folder moves into one path. For a non-Windows system like
Mac OSX and Linux, this is done by inserting / between the individual moves. For Windows, \ is the
folder separator. For example, in Mac OSX,
cd ../foo/bar
changes the working folder to the parent, to a child of the parent named foo, and then to a child of
the child named bar. bar is thus a grandchild folder of the parent of the present working folder.
To check what the working folder directly is, the command pwd can be used for a non-Windows
system, and chdir for Windows. These commands print the path to the working folder, starting from
the “home” folder on the screen. It is also possible to take the inventory of the files in the working
folder using the command ls for a non-Windows system, and dir for Windows. This command
produces a list of all the files in the working folder.
As mentioned earlier, all Java source files must have the file name extension .java. We call them
Java files. To compile the source code Foo.java in a command line interface, one must type the
command:
javac Foo.java
If the source code compiles without error, a file named Foo.class is created. This is the bytecode
of the program. We call it a class file. If the class file already exists, then the file is overwritten
upon successful compilation. In the case of IDE, .class files are generated only during the
execution process. If Foo.java has compiled successfully, the program can be executed by using
the command:
java Foo
after the prompt.
Here is an example of a user interaction with a command line interface, where the user tries to
compile and then execute a program whose source code is HelloWorld.java (Fig. 1.4). The
prompt of the command line interface is the percent symbol followed by one white space. The first
line is the compilation command, the second line is the execution command, the third line is the result
of executing the code, and the fourth line is the command prompt after the execution.
Let us start writing Java programs. Our first program is the popular Hello, World! program.
Using this code, we shall learn some important ingredients of Java programs.
The three words in the first line:
public class HelloWorld
state that:
There are four kinds of program units: class, interface abstract class, and enum. This
book covers class and interface only.
The keyword public specifies that the unit is accessible from other program units. A keyword
that specifies the accessibility of program units and their components is called a visibility attribute.
There are three explicit visibility types: public, private, and protected. The default visibility
type, when there is no explicit visibility attribute, is the package visibility.
The order of appearance of the three components,
VISIBILITY_TYPE UNIT_TYPE NAME
applies to all Java source code files.
Every source file in Java has the file extension .java. In a single .java file, multiple classes
can be defined, simply by concatenating their source codes. In such a case, at most one class may be
public. In addition, if a source file contains a unit with the public visibility, the name of the unit
must match the file name. For example,
1 class Foo
2 {
3 ...
4 }
5 class Bar
6 {
7 ...
8 }
is okay, but
8 1 “Hello, World!”
is not.
attempting to compile the source code (that is, the command javac HelloWorld.java)
produces the following error message:
The first two lines of the error message state the nature of the error, which is that, to define a class by
the name of Hello, the file name must be Hello.java. The next three lines of the error message
specify the location of the error using the “caret” symbol ^. According to the marking, the error is
at the class declaration. The last line of the error message is the total number of errors found in the
source code.
If the source file name HelloWorld.java is retained but the public attribute is removed, like
this one:
1.2 The First Program, “Hello, World!” 9
1 class Hello
2 {
3 public static void main ( String [] args )
4 {
5 System . out . println ( " Hello , World ! " ) ;
6 }
7 }
the code compiles, but the .class generated is Hello.class, not HelloWorld.class.
In Java, curly brackets { } are used to enclose units, components, and code blocks. For example, the
declaration of each program unit (such as class and interface) should be followed by a matching pair
of curly bracket. Two matching pairs appear either one after the other or one inside the other; that is,
either { ... { ... } ... } or { ... } ... { ... }
For a source file to compile successfully, all of its curly brackets must have unique matching partners.
Thus, the depth of a text in a source code can be defined as the number of matching pairs enclosing
it. Multiple methods may appear in one source code.
In the source code of HelloWorld.java, the opening line public class HelloWorld
is at depth 0, public static void main( String[] args ) is at depth 1, and
System.out.println( ... ) is at depth 2. The component appearing between lines 3 and 6
is called a method.
A method has a name and defines a set of actions needs to be performed. Some methods process
information given to the in the form of parameters. Some methods report the results through the use
of return values. We cover this topic in Chap. 5.
A special kind of method is the method main. Each method main takes the form of:
public static void main( String[] args )
as its declaration. The term args appearing in the parentheses represents the sequence of characters
that the user types in the command line after the name of the program. We study args in Sect. 13.4.
Only Java classes with a method main can be executed.
The general method declaration consists of the following, where the parts in boxes are optional.
In the case of the method main, the attribute public states that the method is accessible from
outside, the attribute static states that the method is part of some executable program, the return
type void states that the method has no return value, and String[] args specifies that the
parameter is args and its data type is String[]. We study the meaning of square brackets in
Chap. 12. The last component is about handling errors that occur during the execution of the program.
We study this in Chap. 15.
10 1 “Hello, World!”
Note that the prompt % appears at the end line because of the use of System.out.print.
1.2 The First Program, “Hello, World!” 11
In Java source code, the white space, the tab-stop, and the newline all serve as spacing characters. The
following spacing rules must be followed in Java:
• There should be some spacing between two consecutive occurrences of any of the following: type,
attribute, and name.
• Some mathematical and logical symbols run together to mean special operations. In this situation,
there should not be spacing between symbols.
• There should not be any newlines appearing inside a String literal (a character sequence within
a pair of double quotation marks).
Proper spacing makes Java source codes easy to read. For example, it is possible to write:
Although the Java compiler finds no problem in understanding this line of code, a human may find it
to be a bit difficult to parse.
It is advisable to limit the number of characters per line and work within that limit, breaking up long
lines into multiple smaller ones. The spacing, indentation, and the line width are up to the programmer.
Furthermore, indenting from the left end proportionally to the depth of code is good practice (recall
the discussion in Sect. 1.2.1). In other words, using some fixed quantity M, the code at depth D
receives an indentation of M ·D white spaces. The code in this book utilizes this scheme with M = 2.1
Most code examples that appear in this book present each curly bracket as a stand-alone in one line.
1.2.4 Commenting
It is possible to insert texts that have no relevance to how the code runs. Such texts are called
comments. Comments are free-form texts. Java compilers ignore comments when producing class
files and so they exist only in the source file. A programmer can use comments to make notes to
him or herself. For example, comments can be about the expected behavior of the program and about
the underlying algorithms. To save space, the code examples presented in this book use comments
sparingly.
Java has three kinds of comment formats.
The first kind starts with two forward slashes // appearing outside String literals. If two side-by-
side forward slashes appear outside multiple-line comments (see below) and outside String literals,
the two characters and all the characters appearing after them are treated as comments.
1 Some people use M = 4 or M = 8. The latter is equivalent to the tab-stop; i.e., a tab-stop with a depth of 1.
12 1 “Hello, World!”
Because a programmer tends to limit the number of characters per line in the source code,
the comments that start with two forward slashes are naturally suitable for short comments. For
example, in
1 // / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
2 // This program receives two numbers from
3 // the user and prints the result of performing
4 // addition , subtraction , multiplication , and
5 // subtraction on the two .
6 // / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
1 /*
2 * This program receives two numbers from
3 * the user and prints the result of performing
4 * addition , subtraction , multiplication , and
5 * subtraction on the two .
6 */
The * appearing in the middle four lines are extraneous, but programmers tend to put that character
to make the vertical array of * look like the left border of the comments.
Be mindful of the following:
• /* appearing inside a matching pair of double quotation marks behaves as part of the String
literal. The same holds for */ and //.
• All characters appearing between /* and the matching */ are comments. Therefore, /* appearing
in a matching pair of /* and */ is part of the comment represented by the pair.
The last kind of comment is the Javadoc. The Javadoc is a variant of the aforementioned multiple-
line comment and uses a pair of /** and */ in place of /* and */. Javadocs are for publicizing
information about methods and classes and are written using a special syntax. IDEs such as Eclipse
are capable of presenting information available through Javadocs.
The following code shows some examples of commenting.
1 /*
2 * Class for showing comment examples
3 * Written by Mitsunori Ogihara
4 */
5 public class Comments
6 {
7 /* *
8 * main method
9 * @param args the arguments
10 */
11 public static void main ( String [] args )
12 {
13 // There are two lines in the program
14 System . out . println ( " A code needs comments ! " ) ;
15 }
16 }
Listing 1.4 Examples of comments. Lines 1–4 form a multiple-line comment. Lines 7–10 form a Javadoc comment.
Line 13 is a single-line comment
1.2.5 Errors
A syntax error is a part of source code that fails to conform to the Java syntax. If a source code
contains syntax errors, the Java compiler, instead of producing the bytecode, produces an error
message stating that there are syntax errors. If there is a bytecode generated from the prior successful
compilation, that code remains the same without being updated.
The syntax error that a compiler produces is a bit cryptic and takes some experience to comprehend.
Mainly because the compiler is not aware of the true intension of the programmer who wrote the
erroneous code, the stated number of syntax errors does not necessarily agree with the actual number
of syntax errors.
Consider the following code, which is intended to execute three println statements successively.
Listing 1.5 A buggy version of the HelloWorld program. The intended class name is BuggyHelloWorld
14 1 “Hello, World!”
Each error message consists of the source file name, the line number of the error, the nature of the
error, and the actual location of the error (indicated by the caret symbol). In the case of an IDE, instead
of presenting the errors in its command line interface screen, these errors are highlighted in the source
code editor screen.
As can be seen, the number of error messages is greater than the actual number of errors. Although
the number of error messages may exceed the number of true errors, it is always the case that the very
first error message corresponds to the very first syntax error. In the above example, “illegal start of
type” pointing to /--- is a true syntax error. Fixing the very first syntax error in the source code first
is a good strategy.
There are two other types of errors: run-time errors and logic errors. Runtime errors are those
that occur during the execution of code, interrupting the execution. They often result in a premature
termination of the program. Logic errors do not necessarily result in run-time errors, but occur due to
misconception or flaws in the logic of the programmer.
1.3 Using Multiple Statements 15
As mentioned earlier, a method can contain multiple statements. If multiple statements appear in a
method, they act in the order of appearance. Multiple statements can be used to write a program that
executes a complex task.
Consider the following program that prints the “ABC Song”:
The program executes the six System.out.println statements from top to bottom, and
produces the following six-line output.
1 A B C D E F G
2 H I J K L M N O P
3 Q R S and T U V
4 W X Y and Z
5 Now I know my A B C
6 Won’t you sing along with me
Listing 1.7 A source code with multiple print and println statements
16 1 “Hello, World!”
The use of System.out.print at three places has reduced the number of output lines from six to
three. In each of the three lines, two outputs appear side-by-side with no gaps in between. Thus, to
make the connections appear correct, some characters are needed in between. The next code example
fixes this spacing issue by appending the command and the space (i.e., ", ") to the first, third, and
fifth sequences.
Listing 1.8 A source code with multiple print and println statements with some punctuation
In a manner similar to the code for the ABC song, we can write a program that produces some
selected texts on the screen, for example, the poem “Autumn” by an American poet Henry Wadsworth
Longfellow (February 27, 1807 to March 24, 1882).
Thou comest, Autumn, heralded by the rain
With banners, by great gales incessant fanne
Brighter than brightest silks of Samarcand,
And stately oxen harnessed to thy wain!
Thou standest, like imperial Charlemagne,
Upon thy bridge of gold; thy royal hand
Outstretched with benedictions o’er the land,
Blessing the farms through all thy vast domain!
Thy shield is the red harvest moon, suspended
So ‘long’ beneath the heaven’s o’er-hanging eaves;
Thy steps are by the farmer’s prayers attended;
Like flames upon an altar shine the sheaves;
And, following thee, in thy ovation splendid,
Thine almoner, the wind, scatters the golden leaves!
The code Autumn.java that appears next produces this poem on the screen by combining
System.out.print and System.out.println statements, where each line of the poem is
split into two statements.
1.3 Using Multiple Statements 17
Listing 1.10 A code that attempts to use a quotation mark inside a character sequence
What happened during the compilation attempt? The Java compiler tried to pair the first double
quotation mark with another. It chose, however, to pair the second quotation mark with the first.
The compiler then tried to make sense of the remainder def", but it could not.
To correct this problem, we need to tell the compiler that the middle double quotation mark is not
the end marker. Attaching a backslash \ before the quotation mark accomplishes this.
"abc\"def"
With this modification, the code looks like:
1 public class TripleQuoteCorrect
2 {
3 public static void main( String[] args )
4 {
5 System.out.println( "abc\"def" );
6 }
7 }
Listing 1.11 A code that prints a quotation mark inside a character sequence
1.3 Using Multiple Statements 19
We call the action of attaching the backslash to relieve a symbol of its regular duties escaping.
With escaping, we can insert a newline character using the combination \n. To include a tab-stop
character, we can use \t instead of using of the actual tab-stop. The benefit of using the \t is that the
character is visible; if we use the tab-stop character as it is, it is difficult to tell later whether a gap we
see is indeed a tab-stop or just a series of the white space.
Finally, to escape the backslash character, we use the double backslash \\.
Assuming that the tab-stop positions of a terminal program are at every eighth position starting
from the left end, the statement:
System.out.println( "abcdefgh\n\"\\i\tj\nk" );
produces the following output:
1 abcdefgh
2 "\i j
3 k
We can use escaping to print texts with quotation marks and backward slashes. Listing 1.12 is a
program that prints a quotation from Mark Twain’s Adventures of Huckleberry Finn. In one line of
the quote, the addition of System.out.println and the indentation makes the line too long to
fit in the width of 72 characters. To solve this issue, we split the line into two: the first half with
System.out.print and the second half with System.out.println (Lines 17 and 18).
Listing 1.12 A program that prints a quotation from Mark Twain’s Adventures of Huckleberry Finn
Using \n as the newline, we can print multiple short lines into single statements, as shown in
List 1.13. Note that most of the lines contain \n in the character sequence that needs to be printed.
Listing 1.13 A program that uses squeezed print statements to produce the same quotation from Mark Twain’s
Adventures of Huckleberry Finn as before
Suppose we want to print the figure of a right-angled triangle like the one appears next:
1 /|
2 / |
3 / |
4 / |
5 / |
6 / |
7 /______|
In the drawing, we use the forward slash / for the left side of the triangle, the vertical | for the right
side of the triangle, and the underscore _ for the bottom side.
22 1 “Hello, World!”
1 // -- print a triangle
2 public class Triangle
3 {
4 public static void main ( String [] args )
5 {
6 System . out . println ( " /| " ) ;
7 System . out . println ( " / |" );
8 System . out . println ( " / |" );
9 System . out . println ( " / |" );
10 System . out . println ( " / |" );
11 System . out . println ( " / |" );
12 System . out . println ( " / ______ | " ) ;
13 }
14 }
Using the \ for the right edge, we come up with the following code:
1 // -- print an isosceles
2 public class Isosceles
3 {
4 // -- main method
5 public static void main ( String [] args )
6 {
7 System . out . println ( " /\\ " ) ; // line 1
8 System . out . println ( " / \\ " ) ; // line 2
9 System . out . println ( " / \\ " ) ; // line 3
10 System . out . println ( " / \\ " ) ; // line 4
11 System . out . println ( " / \\ " ) ; // line 5
12 System . out . println ( " / \\ " ) ; // line 6
13 System . out . println ( " / ____________ \\ " ) ; // line 7
14 }
15 }
The shape looks a bit unwieldy, since we are using the dash to draw the top line. The triangle will
look better if we draw the top line using an over-line bar character, but unfortunately, such a character
does not exist in our standard character set, so the dash is our only option.
Listing 1.16 The code for producing an upside-down isosceles triangle on the screen
Summary
A command line interface is an environment in which the user, through typing commands after a
prompt, interacts with the system.
In command line interfaces and programming environments, there exists a “working folder”.
The standard header of a Java class is public class CLASS_NAME. Its file name should be
CLASS_NAME.java.
An executable Java class has public static void main( String[] arg ).
To compile a Java program, use the command javac CLASS_NAME.java.
The Java compiler may produce compilation errors due to syntax errors.
The command to use when executing a Java bytecode by the name of CLASS_NAME is
java CLASS_NAME.
A code that compiles may produce terminating errors. Such terminating errors are called run-time
errors.
A code that compiles and is free of run-time errors may still not run correctly. Logical errors are
the culprits.
Java programs use pairs of curly braces to define code blocks.
Unless they are appearing in the source code for an object class, methods need to have the static
attribute.
Methods and classes may have a visibility attribute.
Method declarations must have both a return value specification and a parameter specification.
In a method, multiple statements may appear. Each statement ends with a semicolon.
System.out.println is a method that produces the value of its parameter on the screen and
then prints a newline.
System.out.print is a method that produces the value of its parameter on the screen.
24 1 “Hello, World!”
To print the double quotation mark, the escape sequence of \" is used.
To print the backslash as a character, the escape sequence of \\ is used.
There are three types of comments: single line comments, multiple-line comments, and Javadocs.
Exercises
4. Escaping Which of the following require a backslash when being included in a String literal
(i.e., a series of characters flanked by a pair of double quotation marks)?
• A
• /
(i.e., the forward slash)
• \
(i.e, the backslash)
• "
• %
(i.e., the percentage symbol)
• @
(i.e., the at sign)
Exercises 25
Programming Projects
5. Alma Mater Write a program named AlmaMater that upon execution prints the Alma Mater
of your school. For the University of Miami, the output of the program should look like:
1 UM ALMA MATER
2
3 Southern suns and sky blue water,
4 Smile upon you Alma mater;
5 Mistress of this fruitful land,
6 With all knowledge at your hand,
7 Always just to honor true,
8 All our love we pledge to you.
9 Alma Mater, stand forever
10 On Biscayne’s wondrous shore.
6. Printing a Diamond Write a program named Diamond.java that prints the shape of a
diamond of height 10 and width 10 as shown:
1 /\
2 / \
3 / \
4 / \
5 / \
6 \ /
7 \ /
8 \ /
9 \ /
10 \/
7. Printing a Filled Diamond Write a program named DiamondFilled.java that prints the
shape of a diamond of height 10 and width 10 with the white space filled with forward slashes on
the left-hand side and backward slashes on the right-hand side, as shown:
1 /\
2 //\\
3 ///\\\
4 ////\\\\
5 /////\\\\\
6 \\\\\/////
7 \\\\////
8 \\\///
9 \\//
10 \/
9. Cascaded printing Write a program, CascadedChildren, that prints the first two verses of
“Children” by Henry Wadsworth Longfellow with increasing indentations:
26 1 “Hello, World!”
10. Slashes Write a program, Slashes, that produces the following shape on the screen:
1 / / / / / / / / / / / /
2 / / / / / / / / / / /
3 / / / / / / / / / / / /
4 / / / / / / / / / / /
5 / / / / / / / / / / / /
6 / / / / / / / / / / /
7 / / / / / / / / / / / /
8 / / / / / / / / / / /
9 / / / / / / / / / / / /
10 / / / / / / / / / / /
11. Backlashes Write a program, BackSlashes, that produces the following shape on the screen:
1 \ \ \ \ \ \ \ \ \ \ \ \
2 \ \ \ \ \ \ \ \ \ \ \
3 \ \ \ \ \ \ \ \ \ \ \ \
4 \ \ \ \ \ \ \ \ \ \ \
5 \ \ \ \ \ \ \ \ \ \ \ \
6 \ \ \ \ \ \ \ \ \ \ \
7 \ \ \ \ \ \ \ \ \ \ \ \
8 \ \ \ \ \ \ \ \ \ \ \
9 \ \ \ \ \ \ \ \ \ \ \ \
10 \ \ \ \ \ \ \ \ \ \ \
12. Tabstop You can use the tab-stop character \t to line things up (to improve the readability of
the text output). Consider the following code:
1 public class TestTabStop
2 {
3 public static void main ( String [] args )
4 {
5 System . out . println ( " Abbie Zuckerman 23 yrs Soccer " ) ;
6 System . out . println ( " Brittany Ying 21 yrs Swimming " ) ;
7 System . out . println ( " Caty Xenakis 22 yrs Softball " ) ;
8 System . out . println ( " Dee Wick 20 yrs Basketball " ) ;
9 System . out . println ( " Eva Venera 19 yrs Polo " ) ;
10 }
11 }
Revise the program so that it uses the same code, but replaces the whitespace (inside each pair
of double quotation marks) with the tab-stop. Run the program to see how it changes the way the
information appears on the screen.
13. Self introduction Write a program named SelfIntro that introduces yourself as follows:
1 My name is NAME.
2 I was born in PLACE.
3 My favorite television program is PROGRAM.
4 I woke up at HOUR:MINUTE today.
5 I own NUMBER books.
6 My target grade point average is GPA.
The uppercase words NAME, PLACE, PROGRAM, HOUR, MINUTE, NUMBER, and GPA, are
placeholders, so you must substitute them with appropriate text. PROGRAM must appear with
double quotation marks. For example,
1 My name is Mitsu Ogihara.
2 I was born in Japan.
3 My favorite television program is "Parks and Recreation".
4 I woke up at 6:30 today.
5 I own 1000 books.
6 My target grade point average is 4.0.
Using Data for Computation
2
2.1 Data
The previous chapter presented how to write programs using only System.out.println and
System.out.print statements. This chapter introduces how to store, modify, and retrieve
information. The medium in which information is stored is called data.1
In Java, every data has its type, which specifies how the data encodes its information, as well as
what operations can be performed on the data. There are two broad classifications of data types in
Java: primitive data types and object data types.
A primitive data type is one that uses only a predetermined number of bits in representation, where
a bit is the fundamental unit of information and has two possible values (0 and 1). There are eight
primitive data types: boolean for the logical values, char for the characters, byte, short, int,
and long for whole numbers of various capacities, and float and double for real numbers of
various capacities.
On the other hand, an object data type is a custom-designed data type. A programmer designs a
new object data type by putting together existing data types and defining the permissible operations
for acting on the information stored. Some object data types require an indefinite number of bits for
representation.
In addition to the major difference between primitive and object data types, the following
distinctions can be made among data.
1. There are data with names referencing and data without these names.
(a) The former kind is a variable. A special variable is one whose value cannot be changed during
the course of program. Such a variable is called a constant
(b) The latter kind consists of literals and return values. A literal is a data whose value is exactly
specified. A return value is a value that a method returns.
1 The term data is used for both singular and plural forms. The original singular form of “data” is “datum”, but this is
rarely used nowadays.
2. Some variables and constants are accessible only inside the method in which they appear; others
are accessible from everywhere in the class. The former ones are local, and the latter ones are
global.
(a) Some global variables in an object class play the role of storing information for individual
objects of the class. Those variables are instance variables (or field variables).
(b) Each global constant, as well as each instance variable, has a specific visibility type (public,
private, protected, and package).
The sequence "Hello, World!" is a literal of the data type String. Literals are available not
only for String but also for all the primitive data types.
The following is an example of a code using literals:
In Lines 5, 7–9, and 12, String literals appear inside the parentheses. In Lines 6 and 11, literals
1 and 96.8 appear inside the parentheses. These are number literals (an int literal and a double
literal, to be precise).
When this program runs, System.out.print converts these two numbers to character
sequences, then prints those sequences on the screen.
By adding the same sequence of statements for two more quarterbacks, the following program is
obtained.
2.1 Data 31
Listing 2.2 A program that produces comments about three NFL quarterbacks (part 1). The program header and the
part that produces comments about the first player
For these additional two players, number literals appear in Lines 15, 20, 24 and 29.
Listing 2.3 A program that produces comments about three NFL quarterbacks (part 2). The part that produces
comments about the second and the third players
2 Jon Steven “Steve” Young (born October 11, 1961) is a former NFL quarterback and a sportscaster. He played 13
seasons with the San Francisco 49ers, and led the team to three Super Bowl wins. Peyton Williams Manning (born March
24, 1976) is a former NFL quarterback who played with the Indianapolis Colts and later with the Denver Broncos. He
led each team to one Super Bowl win. Thomas Edward Patrick Brady Jr. (born August 3, 1977) is an NFL quarterback
for the New England Patriots. He led the team to five Super Bowl wins.
32 2 Using Data for Computation
A variable is a type of data with a reference name. Simply by putting its name in the code, the value
of the data in that specific moment can be looked up.
Since each data has a unique type, a variable is specified with its name and its type. This is called
a declaration. A declaration takes the following form:
DATA_TYPE VARIABLE_NAME;
Remember that the tab-stop can be used in place of the white space, and adding more tab-stops or
white space after that is possible as well.
One example is the following:
1 public static ...
2 {
3 ...
4 int myInteger ;
5 ...
6 }
Here, int is the data type and myInteger is the name of the data. Notice the semicolon ;
appearing at the end. Each line of local/global variable/constant declarations requires a semicolon at
the end. The above is an instance in which the variable is a local variable. A local variable belongs to
a method and its declaration appears inside the method that it belongs to. The “locality” of variables
becomes important when multiple methods are written in a source code.
To declare a global variable, its declaration is placed outside the methods, at depth 1. For example,
the following declares a global variable named myInteger of data type int.
1 static int myInteger ;
2
3 public static ...
4 {
5 ...
6 }
Here, oneInteger, anotherInteger, and yetAnotherInteger are all of the int data
type. This single-line declaration is equivalent to:
1 int oneInteger ;
2 int anotherInteger ;
3 int yetAnotherInteger ;
To name a variable, a sequence of contiguous characters chosen from the alphabet, numerals, the
underscore _, and the dollar sign $ must be used. In addition, the first character of the sequence
must be a letter of the alphabet.3 Thus, according to this rule, 55 cannot be a variable name. The
3 Technically,
a variable name can start with the underscore or the dollar sign, but the convention is to start a variable
name with a lowercase letter.
2.1 Data 33
variable names, method names, and class names are all case-sensitive. The following conventions are
generally used:
As mentioned earlier, variables (or constants) are places where information is stored. The action of
giving a value to a variable/constant is called an assignment.
The syntax for an assignment is:
VARIABLE = VALUE;
Here, the equal sign = appearing in the middle symbolizes the assignment. The left-hand side of the
assignment, VARIABLE, is the name of the variable in which a value is to be stored. The right-hand
side of an assignment, VALUE, is the value being stored. JVM can interpret this as a data having the
same type as the variable. The value in an assignment can be:
1 int myInteger ;
2 myInteger = 55;
The first line here is a variable declaration. The type of the data is int and the name of the data is
myInteger. The second line is an assignment. The right-hand side of the assignment is an int
literal with the value of 55. This action stores the value of 55 into the variable myInteger.
It is possible to combine a declaration of a variable and an initial value assignment to the variable
all in a single statement, like this one:
It is also possible to combine multiple declarations and assignments of multiple variables in one line,
so long as they all have the same type. The following is an example of such combinations:
This single line of code declares int variables, oneInteger, anotherInteger, and
yetAnotherInteger, and assigns the value of 17 to oneInteger and the value of 23 to
yetAnotherInteger (note that 17 and 23 are literals).
Here, anotherInteger does not have an assignment. Does it have a value? Yes, the default
value of a variable of a primitive number type immediately after declaration is 0.
34 2 Using Data for Computation
as well as to:
For the code to compile, the value assigned to a variable must match the data type of the variable.
In the above code fragment, an attempt to assign numbers with a decimal point,
results in a syntax error, because neither 17.5 nor 23.0 are integers.
The first variable, YOUR_INTEGER, is a global constant and the second variable, MY_NUMBER, is
a local constant. Java requires that a value must be assigned to a constant using a combined declaration
and assignment. Therefore, in the above code example, splitting the declaration and assignment of
either constant into a standalone declaration and a standalone assignment is rejected as a syntax error.
A global constant may have an explicit visibility specification. As mentioned in Chap. 1, there are
three explicit visibility specifications: public, private, and protected. In the source code:
Reassignment
If a variable is not a constant, the value of the variable can be updated any number of times. Consider
the next code:
1 int myInteger ;
2 myInteger = 63;
3 ...
4 myInteger = 97;
5 ...
6 myInteger = 20;
The dotted parts represent some arbitrary code. Assuming that no assignments to myInteger appear
in the dotted part, the value of myInteger changes from 63 to 97 in Line 4 and from 97 to 20 in
Line 6.
Java has eight primitive data types. They are boolean, byte, short, int, long, float, double, and char.
Table 2.1 shows the range of possible values for each type.
boolean
The boolean is a data type for storing a logical value. There are only two possible values for a
boolean data type: true and false. Here is an example of declaring boolean variables and
assigning values to them.
There are three operators available for boolean: the negation !, the conjunction &&, and the
disjunction ||. The boolean data type will be discussed in Chap. 6.
byte
The data type byte consists of eight bits, so there are 28 = 256 possible values. The value range
of byte is between −27 = −128 and 27 − 1 = 127. The hexadecimal encoding is an encoding
that is often used for specifying a byte literal. This is the encoding that divides the bits into groups
of four and uses a unique character to represent each of the 16 possible values for each group. The
value range of four bits is between 0 and 15, so naturally the numerals 0 through 9 are used for
representing numbers 0 through 9. For the numbers 10 through 15, the letters a through f (or their
upper case letters A through F) are used. In hexadecimal encoding, a byte must be represented with
two characters. The combination YZ represents
short
The data type short consists of sixteen bits. It has 65,536 possible values. The value range is
between −215 = −32,768 and 215 − 1 = 32,767.
int
int is a data type that consists of 32 bits. It has 4,294,967,296 possible values. The value range is
between −231 = −2,147,483,648 and 231 − 1 = 2,147,483,647. The default data type of a whole
number literal is int.
long
The data type long consists of 64 bits. It has 18,446,744,073,709,551,616 possible values. The value
range is between −263 = −9,223,372,036,854,775,808 and 263 − 1 = 9,223,372,036,854,775,807.
When presenting a literal in long, if the value that the literal represents goes beyond the range of
int, the letter L must be attached as a suffix at the end of the number sequence, like this one:
encoding system uses a fixed “base” for exponentiation, which is either 2 or 10. Let B be this base. If
there are n bits in the exponent, that part encodes a number between −2n−1 and 2n−1 − 1 (for whole
number types). Let E be this number. Now, the bits of the floating number altogether represent
S · (1 + C) · B E .
To designate that a floating point number literal is a float, the letter F must be attached as a suffix.
Here is an example of declaring and assigning a literal value to one variable for each primitive
number type:
1 byte myByte ;
2 short myShort ;
3 int myInt ;
4 long myLong ;
5 float myFloat ;
6 double myDouble ;
7 myByte = 0 x3d ;
8 myShort = 1345;
9 myInt = 90909;
10 myLong = 1234567890123456789 L ;
11 myFloat = -3.145 F ;
12 myDouble = 1.7320504;
The numbers appearing after ’=’ in lines 7–12 are all literals.
char
The last primitive data type is char. The representation of char requires sixteen bits. By attaching
the apostrophe before and after of a character, a char literal is specified, as in ’A’ and ’x’.
1 char myChar1 = ’A ’;
2 char myChar2 = ’x ’;
The default value of a char type variable is \0. This is the character corresponding to the number
0. This must not be confused this with the numeral 0. There is no direct arithmetic operation that can
be applied to char data for producing another char, but if a char data appears in a mathematical
formula, it acts as if it were an int. Since the single quotation mark is used for a char literal, to
specify the single quotation mark itself as a char literal, attaching a backslash as is must be done to
represent the double quotation mark in String literals; that is, ’\” represents the single quotation
mark. Because of this special use of backslash, two backslashes are used to mean the backslash itself
as a literal, as in ’\\’. The other escape sequences, ’\t’ and ’\n’, are valid for char literals too.
Using the fact that reassignments of values can be made to non-final variables, the previous three-
favorite-quarterback program can be rewritten using three variables:
• an int variable, rank, for specifying the rank in the list
• a String variable, name, for the name of the quarterback, and
• a double variable, qbr, for the quarterback rating.
38 2 Using Data for Computation
Listing 2.4 A program that produces comments about three NFL quarterbacks using variables (part 1). The variable
declarations and the part that produced the comments about the first player
Note that the variable declarations appear in Lines 4, 5, and 7. The variable declarations are
followed by three blocks of the same format, each consisting of eleven lines. The first lines of each
block assign values to the variables. For example, the first lines of the first block are:
1 rank = 1;
2 name = " Steve Young " ;
3 qbr = 96.8;
The next eight lines of code make the presentation, with the three literals for rank, name, and rating
substituted with their respective names.
1 ...
2 System.out.print( rank );
3 ...
4 System.out.print( name );
5 ...
6 ...
7 System.out.print( qbr );
8 ...
In these three lines, the values of these variables substitute their respective locations into the print
statements. Note that the action order is:
declaration → assignment → reference
Since assignments can be made multiple times to non-final variables, a variable declaration is
effective until the end of the innermost pair of curly brackets that contains it. This means that two
declarations of the same variables cannot intersect. In the above program, the innermost matching
pair containing a variable declaration appears at Lines 4 and 44. Thus, the declarations are valid until
Line 44. Formally, the range of lines in which a variable declaration is valid is called the scope of the
variable.
Random documents with unrelated
content Scribd suggests to you:
CHAPTER XXII.
The reader may be weary of hearing of nights which went over in agitation,
and mornings which rose upon an excitement not yet calmed down. But it is
inevitable in such a crisis as that which we are describing that the
excitement should last from one day to another. The same party who had
met on the previous night in the library to examine the packet of letters,
which had occasioned all this distress and trouble, met again next morning
at breakfast. Clare did not appear. She had sent for Edgar in the morning,
rousing him out of the brief, uneasy slumber which he had fallen into in
broad daylight, after his night of trial. She had received him in her dressing-
room, with a white muslin wrapper thrown round her, and her hair hanging
about her shoulders, as she would have received her brother. But though the
accessories of the scene were carefully retained, there was a little flush of
consciousness on Clare’s cheek that it was not her brother who was coming
to her; and Edgar did not offer the habitual kiss, but only took her hand in
his while she spoke to him. “I cannot come down,” she said. “I will not
come down again while Arthur Arden is in the house. That is not what I
mean; for I suppose, now you have made up your mind, it is Arthur Arden’s
house, and not ours.”
“It is not mine,” said Edgar. “Something else happened last night which
confirmed everything. It is quite unimportant whether I make up my mind
or not. The matter is beyond question now.”
“What happened last night?” said Clare eagerly.
“I will tell you another time. We found out, I think, who I really am.
Don’t ask me any more,” said Edgar, with a pang which he could not
explain. He did not want to tell her. He would have accepted any excuse to
put the explanation off.
Clare looked at him earnestly. She did not know what to say—whether to
obey a rising impulse in her heart (for she, too, was a genuine Arden) of
impatience at his tame surrender of his “rights”—or the curiosity which
prompted her to inquire into the new discovery; or to do what a tender
instinct bade her—support him who had been so true a brother to her by one
more expression of her affection. She looked up into his face, which began
to show signs of the conflict, and that decided her. “You can never be
anything less to me than my brother,” she said, leaning her head softly
against his arm. Edgar could not speak for a moment—the tears came thick
and blinding to his eyes.
“God bless you!” he said. “I cannot thank you now, Clare. It is the only
drop of sweetness in my cup; but I must not give way. Am I to say you
cannot come down stairs? Am I to arrange for my dear sister, my sweet
sister, for the last time?”
“Certainly for this time,” said Clare. “Settle for me as you think best. I
will go where you please. I can’t stay—here.”
She would have said, “in Arthur Arden’s house,” but the words seemed
to choke her; for Arthur Arden had not said a word to her—not a word—
since he knew——
And thus authorised, Edgar presented himself before the others. He took
no particular notice of Arthur Arden. He said calmly, “Miss Arden does not
feel able to join us this morning,” and took, as a matter of course, his usual
place. There was very little said. Arthur sat by sullenly, beginning to feel
himself an injured man, unjustly deprived of his inheritance. He was the
true heir, wrongfully kept out of his just place: yet the interest of the
situation was not his, but clung to the impostor, who accepted ruin with
such a cheerful and courageous quiet. He hated him, because even in this
point Edgar threw him quite into the shade. And Arthur felt that he might
have taken a much superior place. He might have been magnanimous,
friendly, helpful, and lost nothing by it; but even though the impulse to take
this nobler part had once or twice visited him, he had not accepted it; and he
felt with some bitterness that Edgar had in every way filled a higher rôle
than himself.
They had finished their silent breakfast when Edgar addressed him. He
did it with a marked politeness, altogether unlike his aspect up to this time.
He had been compelled to give up the hope that his successor would be his
friend, and found there was nothing now but politeness possible between
them. “I will inform Mr. Fazakerly at once,” he said, “of what took place
last night. He will be able to put everything into shape better than we shall.
As soon as I have his approbation, and have settled everything, I will take
my sister away.”
“She is not your sister,” said Arthur, with some energy.
“I know that so well that it is unkind of any one to remind me,” said
Edgar, with sudden tears coming to his eyes; “but never mind. I repeat we
will leave Arden to-day or to-morrow. It is easier to make such an
arrangement than to break the natural bonds that have been between us all
our lives.”
Arthur had made a calculation before he came downstairs. He had taken
a false step last night when he adopted an insolent tone to, and almost
attempted to pick a quarrel with the man who was saving him so much
trouble; but in the circumstances he concluded that it was best he should
keep it up. He said abruptly, “Miss Arden is not your sister. I object as her
nearest relation. How do I know what use you may make of the influence
you have obtained over her? I object to her removal from Arden—at least
by you.”
Edgar gave Mr. Fazakerly a look of appeal, and then made a strong effort
to command himself. “I have nothing to keep now but my temper,” he said,
with a faint smile, “and I hope I may be able to retain that. I don’t know that
Mr. Arden’s presence is at all needed for our future consultations; and I
suppose, in the meantime, as I am making a voluntary surrender of
everything, and he could not by legal form expel me for a long time, I am
justified in considering this house, till I give it up, to be mine, and not his?”
“Certainly, Arden is yours,” said Mr. Fazakerly. “You are behaving in the
most unprecedented way. I don’t understand what you would be at; but Mr.
Arthur Arden is utterly without power or capability in the matter. All he can
do is to inform his lawyer of what he has heard——
“No power in the matter!” cried Arthur. “When I heard that woman
confess last night openly that this—this gentleman, who has for so long
occupied the place I ought to occupy, was her grandson! What do you mean
by no power? Is Mr.—— Murray—if that is his name—to remain master of
my house, in face of what I heard with my own ears——”
“You are perfectly entitled to bring an action, and produce your
witnesses,” said Mr. Fazakerly promptly; “perfectly entitled—and fully
justified in taking such a step. But in the meantime Mr. Edgar Arden is the
Squire, and in full possession. You may wait to see what his plans are (no
doubt they are idiotical in the highest degree), or you can bring an action;
but at the present moment you have not the smallest right to interfere——”
“Not in respect to my cousin!” Arthur said, with rising passion.
“Not in respect to anything,” said the lawyer cheerfully.
And then the three stood up and looked at each other—Mr. Fazakerly
having taken upon himself the conduct of affairs. It was Arthur only who
was agitated, Edgar having recovered his composure by renunciation of
everything, and the lawyer having fully come to himself, out of sheer
pleasure in the conflict which he foresaw.
“There have been a great many indiscreet revelations made, and loose
talk of all kinds,” Mr. Fazakerly continued; “enough, I don’t doubt, to
disturb the ideas of a man uninstructed in such matters. That is entirely your
cousin’s fault, not mine; but I repeat you have no power here, Mr. Arthur
Arden, either in respect to Miss Clare or to anything else. Mere hearsay and
private conversation are nothing. I doubt very much if the case will hold
water at all; but if it does, it can only be of service to you after you have
raised an action and proved your assertions. Good morning, Mr. Arthur. You
have gone too fast and too far.”
And in another moment Arthur was left alone, struggling with himself,
with fury and disappointment not to be described. He was as much cast
down as he had been elated. He gave too much importance to these words,
as he had given to the others. He had thought, without any pity or ruth, that
he was to take possession at once; and now he felt himself cast out. He
threw himself down in the window seat and gnawed his nails to the quick,
and asked himself what he was to do. A lawsuit, a search for evidence, an
incalculable, possibly unrecompensed expenditure—these were very
different from the rapid conclusion he had hoped.
“My dear young friend,” said Mr. Fazakerly solemnly, turning round
upon Edgar as they entered the library, “you have behaved like an idiot!—I
don’t care who tells you otherwise, or if it has been your own unassisted
genius which has brought you to this—but you have acted like a fool. It
sounds uncivil, but it is true.”
“Would you have had me, as he says, carry on the imposture,” said
Edgar, with an attempt at a smile. “Would you have had me, knowing who I
am——”
“Pooh! pooh!” said Mr. Fazakerly. “Pooh! pooh! You don’t in the least
know who you are. And that is not your business in the least—it is his. Let
him prove what he can; you are Edgar Arden, of Arden, occupying a
position which, for my part, I think you ought to have been contented with.
To make yourself out to be somebody else is not your business. Sit down,
and let me hear what you have to say.”
Then the client and the adviser sat down together, and Edgar related all
the particulars he had learned. Mr. Fazakerly sobered down out of his
hopeful impatience as he listened. He shook his head and said, “Bad, very
bad,” at intervals. When he heard what Mrs. Murray had said, and that it
was in Arthur Arden’s presence, he gave his head a redoubled shake. “Very
—bad—indeed,” and pondered sadly over it all. “If you had but spoken to
me first; if you had but spoken to me first!” he cried. “I don’t mean to say I
would have advised you to keep it up. An unscrupulous counsellor would
have told you, and with truth, that you had every chance in your favour.
There was no proof whatever that you were the boy referred to before this
Mrs. Murray appeared; and nothing could be easier than to take Mrs.
Murray out of the way. But I don’t advise that—imposture is not in my way
any more than in yours, Mr. Edgar. But at least I should have insisted upon
having a respectable man to deal with, instead of that cold-blooded egotist;
and we might have come to terms. It is not your fault. You are behaving
most honourably—more than that—Quixotically. You are doing more than
any other man would have done—and we could have made terms. There
could have been no possible objection to that.”
“Yes, I should have objected,” said Edgar; “I do not want to make any
terms——”
“Then what do you mean to do?” cried Mr. Fazakerly. “It is all very fine
to be high-minded in theory, but what are you to do? You have not been
brought up to any profession. With your notions, you could never get on in
business. What are you to do?”
Edgar shook his head. He smiled at the same time with a half-amused
indifference, which drove his friend to renewed impatience.
“Mr. Edgar,” he said solemnly, “I have a great respect for you. I admire
some of your qualities—I would trust you with anything; but you are
behaving like a fool——”
“Very likely,” said Edgar, still with a smile. “If that were all! Do you
really suppose that with two hands capable of doing a few things, not to
speak of a head and some odd scraps of information—do you really
suppose a man without any pride to speak of, will be unable to get himself a
living? That is nonsense. I am quite ready to work at anything, and I have
no pride——”
“I should not like to trust too much to that,” said Mr. Fazakerly, shaking
his head. “And then there is your sister. Miss Clare loses by this as much as
you do. Of course now the entail stands as if you had never taken any steps
in the matter, and Old Arden is hers no longer. Are you aware that,
supposing her fully provided for by that most iniquitous bequest, your
father left her nothing else? She will be a beggar as well as you.”
“You don’t mean it!” cried Edgar, with a flush of warm colour rushing
over his face. “Say that again! You don’t really mean it? Why, then, I shall
have Clare to work for, and I don’t envy the king, much less the proprietor
of Arden. Shake hands! you have made me twice the man I was. My sister
is my sister still, and, after all, I am not alone in the world.”
Mr. Fazakerly looked at the young man aghast. He said to himself,
“There must be madness in the family,” not recollecting that nothing in the
family could much affect Edgar, who did not belong to it. He sat with a
certain helpless amazement looking at him, watching how the life rose in
his face. He had been very weary, very pale, before, but this news, as it
were, rekindled him, and gave him all his energy back.
“I thought it did not matter much what became of me,” he said, with a
certain joyous ring in his voice, which stupified the old lawyer. “But it does
matter now. What is it, Wilkins? What do you want?”
“Please, sir, Lady Augusta Thornleigh and the young ladies is come to
call,” said Wilkins. “I’d have shown them into the drawing-room, but Mr.
Arthur Arden he’s in the drawing-room. Shall they come here?”
Edgar’s countenance paled again as suddenly as it had grown bright. His
face was like a glass, on which all his emotions showed. “They must want
to see my sister,” he said, with a certain longing and wistfulness in his tone.
“It was you, sir, as my lady asked for, not Miss Arden. It’s the second
one of the young ladies as is with her—Miss Augusta I think they calls her,
sir,” said Wilkins, not without some curiosity. “They said special as they
didn’t want to see no strangers—only you.”
Edgar rose up once more, his face glowing crimson, his eyes wet and
full. “Wherever they please—wherever they please,” he said half to himself,
with a confused thrill of happiness and emotion. “I am at their orders.” He
did not know what he expected. His heart rose as if it had wings. They had
come to seek him. Was not he receiving compensation, more than
compensation, for all his pain?
But before he could give any orders, before Mr. Fazakerly could gather
up his papers, or even offer to go away, Lady Augusta herself appeared at
the open door.
CHAPTER XXIII.
Lady Augusta came in with a disturbed countenance and traces of anxiety
on her brow. She was alone, and though her good heart, and another pleader
besides, had impelled her to take this step, she was a little doubtful as to the
wisdom of what she was doing, and a little nervous as to the matter
generally. She had her character for prudence to keep up, she had to keep
the world in ignorance of the danger there had been to Gussy, and of all the
pain this business had cost her. And yet she could not let the poor boy, who
had been so disinterested and so honourable, go without a word from her—
without once more holding out her hand. She said to herself that she could
not have done it, and at all events it was quite certain that Gussy would
have given her no peace, and would have herself done something violent
and compromising, had her mother resisted her determination. “I will be
very good,” Gussy had said. “I will say nothing I ought not to say; but he
was fond of me, and I cannot, cannot let him go without a word!” Lady
Augusta’s heart had spoken in the same tone; but the moment she had
yielded, the other side of the question appeared to her, and a hundred fears
lest she should compromise her child had taken possession of her mind. It
was this which had brought her alone to the library door, leaving Gussy
behind. She came forward, almost with shyness, with an air of timidity
quite unlike her, and held out both her hands to Edgar, who for his part
could scarcely repress an exclamation of disappointment at seeing her
alone. “I am so glad to see Mr. Fazakerly with you,” Lady Augusta said,
taking prompt advantage of this fact, and extending her hand graciously to
the lawyer. “I do hope you have dismissed that incomprehensible story you
told me altogether from your mind.”
“Don’t be angry with me,” said Edgar, gazing at her wistfully; “but was
it with that idea you came here?”
She looked at him, and took in at a glance the change in his appearance,
the pathetic look in his eyes, and her heart was touched. “No,” she said,
“no, my poor boy; it was not that. We came to tell you what we felt—what
we thought. Oh, Mr. Fazakerly, have you heard this dreadful story? Is it
true?”
“I decline to say what is and what is not true,” said Mr. Fazakerly,
doggedly. “I am not here to define truth. Your ladyship may think me very
rude, but Mr. Arden is behaving like a fool.”
“Poor boy!” said Lady Augusta; “poor boy!” Her heart was bleeding for
him, but she did not know what to do or say.
“You said we,” said Edgar. “Some one else came with you. Some one
else had the same kind thought. Dear Lady Augusta, you will not take that
comfort from me now.”
Lady Augusta paused, distracted between prudence and pity. Then she
drew herself up with a tremulous dignity. “Mr. Fazakerly has daughters of
his own,” she said. “I am not afraid that he will betray mine. Yes, Mr.
Arden, Gussy has come with me. She insisted upon coming. There has
never been anything between them,” she added, turning to the lawyer.
“There might have been, had he not found out this; but the moment he
discovered——, like a true gentleman, as he is——” Here Lady Augusta
had to pause to stifle her tears. “And my Gussy’s heart is so warm. She
would not let him go without bidding him good-bye. I told her it was not
prudent, but she would not listen to me. Of course, it must end here; but our
hearts are breaking, and we could not let him go without one good-bye.”
She stopped, with a sob, and once more held out her hand. Poor woman!
even at that moment it was more herself than him she bewailed. Standing
there in his strength and youth, it did not seem possible to believe that the
world could go very badly with him; but how unfortunate she was! Ada
first, and then Gussy; and such a son as he would have been—somebody to
trust, whatever happened. She held out her hand to him, and drew him close
to her, and wept over him. How unfortunate she was!
“And Gussy?” said Edgar eagerly.
“I put her into the little morning-room, Clare’s room,” said Lady
Augusta. “Go to her for a few minutes; Mr. Fazakerly will not think it
wrong of me, I am sure. And oh, my dear boy, I know I can trust you not to
go too far—not to suggest anything impossible, any correspondence—
Edgar, do not try my poor child too far.”
He pressed her hand, and went away, with a kind of sweet despair in his
heart. It was despair: hope and possibility had all gone out of any dream he
had ever entertained on this subject; but still it was sweet, not bitter. Lady
Augusta sat silent for some minutes, trying to compose herself. “I beg your
pardon,” she said; “indeed I can’t help it. Oh, Mr. Fazakerly, could no
arrangement be made? I cannot help crying. Oh, what a dear fellow he is!
and going away from us with his heart broken. Could nothing be done?—
could no arrangement be made?”
“A great many things could be done, if he was not behaving like a fool,”
said Mr. Fazakerly. “I beg your pardon; but it is too much for me. He is like
an idiot; he will hear no reason. Nobody but himself would have taken any
notice. Nobody but himself——”
“Poor boy—poor dear boy!” said Lady Augusta. And then she entered
into the subject eagerly, and asked a hundred questions. How it had been
found out—what he was going to do—what Arthur Arden’s position would
be—whether there ought not to be some provision made for Edgar? She
inquired into all these matters with the eagerness of a woman who knew a
great deal about business and was deeply interested for the sufferer. “But
you must not suppose there was anything between him and my daughter,”
she repeated piteously; “there never was—there never was!”
In the meantime, Edgar had gone hastily, with a thrill of sadness and of
pleasure which it would be difficult to describe, to the room where Gussy
was. He went in suddenly, excitement and emotion having brought a flush
upon his cheeks. She was standing with her back to the door, and turned
round as he opened it. Gussy was very much agitated—she grew red and
she grew pale, her hands, which she extended to him, trembled, tears filled
her eyes. “O Mr. Arden!” was all she was able to say. As for Edgar, his heart
so melted over her that he had hard ado to refrain from taking her into his
arms. It would have been no harm, he thought—his embrace would have
been that of a brother, nothing more.
“It is very, very good of you to come,” he said, his own voice faltering
and breaking in spite of him. “I don’t know how to thank you. It makes me
feel everything so much less—and so much more.”
“I could not help coming,” said Gussy, with a choking voice. “O Mr.
Arden, I am so grieved—I cannot speak of it—I could not let you go
without—without——”
She trembled so that he could not help it—he drew her hand through his
arm to support her. And then poor Gussy, overwhelmed, all her self-restraint
abandoning her, drooped her head upon his shoulder as the nearest thing she
could lean upon, and burst into tears.
There had never been a moment in her life so sad—or in either of their
lives so strangely full of meaning. A few days ago they were all but
affianced bride and groom, likely to pass their entire lives together. Now
they met in a half embrace, with poignant youthful feeling, knowing that
never in their lives would they again be so near to each other, that never
more could they be anything to each other. It was the first time, and it
would be the last.
“Dear Gussy,” Edgar said, putting his arm softly round her, “God bless
you for being so good to me. I will cherish the thought of you all my life.
You have always been sweet to me, always from the beginning; and then I
thought—— But, thank God, you are not injured. And thank you a thousand
and a thousand times.”
“Oh, don’t, don’t!” cried Gussy. “Don’t thank me, Mr. Arden. I think my
heart will break.”
“Don’t call me Mr. Arden; call me Edgar now; it is the only name I have
a right to; and let me kiss you once before we part.”
She lifted up her face to him, with the tears still wet upon her cheeks.
They loved each other more truly at that moment than they had ever done
before; and Gussy’s heart, as she said, was breaking. She threw her arms
round his neck, and clung to him. “O Edgar, dear! Good-bye, good-bye!”
she sobbed. And his heart, too, thrilled with a poignant sweetness, ineffable
misery, and consolation, and despair.
This was how they parted for ever and ever—not with any pretence
between them that it could ever be otherwise, or anything that sounded like
hope. Lady Augusta’s warning was unnecessary. They said not a word to
each other of anything but that final severance. Perhaps in Gussy’s secret
heart, when she felt herself placed in a chair, felt another sudden hot kiss on
her forehead, and found herself alone, and everything over, there was a
pang more secret and deep-lying still, which felt the absence of any
suggestion for the future; perhaps there had flitted before her some phantom
of romance, whispering what he might do to prove himself worthy of her—
revealing some glimpse of a far-off hope. Gussy knew all through that this
was impossible. She was sure as of her own existence that no such thing
could be; and yet, with his kiss still warm on her forehead—a kiss which
only parting could have justified—she would have been pleased had he said
it, only said it. As it was, she sat and cried, with a sense that all was finished
and over, in which there lay the very essence of despair.
Edgar returned to the library while Lady Augusta was still in the very
midst of her interrogations. She stopped short at sight of him, making an
abrupt conclusion. She saw his eyes full of tears, the traces of emotion in
his face, and thanked God that it was over. At such a moment, in such a
mood, it would have been so difficult, so impossible to resist him. If he
were to ask her for permission to write to Gussy, to cherish a hope, she felt
that even to herself it would have been hard, very hard, to say absolutely,
No. And her very soul trembled to think of the effect of such a petition on
Gussy’s warm, romantic, young heart. But he had not made any such
prayer; he had accepted the unalterable necessity. She felt sure of that by the
shortness of his absence, and the look which she dared scarcely contemplate
—the expression of almost solemnity which was upon his face. She got up
and went forward to meet him, once more holding out both her hands.
“Edgar,” she said, “God will reward you for being so good and so true.
You have not thought of yourself, you have thought of others all through,
and you will not be left to suffer alone. Oh, my dear boy! I can never be
your mother now, and yet I feel as if I were your mother. Kiss me too, and
God bless you! I would give half of everything I have to find out that this
was only a delusion, and that all was as it used to be.”
Edgar shook his head with a faint smile. There passed over his mind, as
in a dream, the under-thought—If she gave half of all she had to bring him
back, how soon he would replace it; how easy, were such a thing possible,
any secondary sacrifice would be! But notwithstanding this faint and misty
reflection, it never occurred to him to think that it was because he was
losing Arden that he was being thus absolutely taken farewell of. He
himself was just the same—nay, he was better than he ever had been, for he
had been weighed in the balance, and not found wanting. But because he
had lost Arden, and his family and place in the world, therefore, with the
deepest tenderness and feeling, these good women were taking leave of
him. Edgar, fortunately, did not think of that aspect of the question. He
kissed Lady Augusta, and received her blessing with a real overflowing of
his heart. It touched him almost as much as his parting with Gussy. She was
a good woman. She cried over him, as if he had been a boy of her own.
“Tell me anything I can do for you,” she said—“anything, whatever it is.
Would you like me to take charge of Clare? I will take her, and we will
comfort her as we best can, if she will come with me. She ought not to be
here now, while the house is so much agitated, and everything in disorder;
and if there is anything to be done about Mr. Arthur Arden—Clare ought
not to be here.”
She had not the heart to say, though it was on her lips, that Clare ought
not to be with the man who was no longer her brother. She caught his
wistful look, and she could not say the words, though they were on her lips.
But her offer was not one to be refused. Edgar—poor Edgar—who had
everything to do—to sign his own death-warrant, as it were, and separate
himself from everything that was near to him, had to go to Clare to
negotiate. Would she go with Lady Augusta? He spoke to her at the door of
her room, not entering, and she, with a flush of pain on her face, stood at
the door also, not inviting him to go in. The division was growing between
them in spite of themselves.
“Would you come to see me at Thorne?” said Clare. “Upon that must
rest the whole matter whether I will go or not.”
Edgar reflected, with again that sense of profound weariness stealing
over him, and desire to be done with everything. No; he could not go
through these farewells again—he could not wear his heart out bit by bit.
This must be final, or it was mere folly. “No,” he said; “it would be
impossible. I could not go to see you at Thorne.”
“Then I will not go,” said Clare. And so it was settled, notwithstanding
all remonstrances. The more she felt that distance creep between, the more
she was determined not to recognise or acknowledge it. Edgar went back to
the library and gave his message, and stayed there, restraining himself with
an effort, while Mr. Fazakerly gave her ladyship his arm and conducted her
to her carriage. Edgar would not even give himself that last gratification; he
would not disturb Gussy again, or bring another tear to her eyes. It was all
over and ended, for ever and ever. His life was being cut off, thread after
thread, that he might begin anew. Thread after thread—only one trembling
half-divided strand bound him at all to the old house, and name, and
associations. Another clip of the remorseless shears, and he must be cut off
for ever. One scene after another came, moving him to the depths of his
being, and passed, and was over. The worst was over now—until, indeed,
his final parting came, and Clare, in her turn, had been given up. But Clare,
like himself, was penniless, and that last anguish might, perhaps, be spared.
CHAPTER XXIV.
Clare left Arden that same afternoon. She came downstairs with her veil
over her face, trembling, yet perhaps hoping to be met upon the way. Even
Edgar was not aware of the moment when she took her flight. She had sent
her maid to see that there was no one about, and even to herself she kept up
the delusion that she wished to see no one—that she was able for no more
agitation. So many long hours had passed—a night, a new morning, another
day—yet Arthur Arden had not sought her, had not repeated those words
which she had bidden him, if he would, repeat. She had made that
concession to him in a moment of utter overthrow, when her heart had been
overwhelmed by the sense of her own weakness and loneliness—by deepest
poignant compassion and love for her brother. She had almost appealed to
him to save them all—she had put, as it were, the welfare of the family into
his hands. It had been done by impulse—almost against her will—for had
she not grievances against him enough to embitter the warmest love? He
had deserted her (she thought) for the merest village girl—a child with a
lovely face, and nothing more. He had slighted her, making vain pretences
of devotion, spending the time with Jeanie which he might have passed at
her side. Yet all this she had forgotten in one moment when her heart was
desperate. She had turned to him as to her last hope. She had as good as
said—“Because I love you, save us.” Not in words—never in words had she
made such a confession. But could he be an Arden and not know that a
woman of the house of Arden never asked help or succour but from a man
she loved? And yet twenty-four hours had passed, and he had made no sign.
She had thought of this all the night. Her heart was sore, and bleeding with
a thousand wounds; there did not seem one corner of it that some sword had
not stabbed. She had lost her father for ever; she could no longer think of
him as she had once done; his image was driven away into the innermost
depths of her heart, where she cherished, and wept over, and loved it, but
could not reverence any longer. And her brother was her brother no more.
He had done nothing to forfeit her love or her respect, but he was not her
brother—different blood flowed in his veins. His very best qualities, his
virtues and excellences, were not like the Ardens. He was a stranger to her
and her race. Thus Clare was left alone and unsupported in the world. And
Arthur! He had wounded her, slighted her, failed to understand her, or,
understanding, scorned. Everything seemed to close round her, every door
at which she might have knocked for sympathy. Her heart was sick, and
sore, and weary with suffering, but not resigned. How could she ever be
resigned to give up everything that was dearest to her, and all that made her
prize her life?
It was for this reason that she stole out in the dullest hour of the
afternoon, when the heart is faintest, and the vital stream flows lowest. She
had a thick veil over her face, and a cloak which completely enveloped her
figure. She left her maid behind to explain to her brother—whom she still
called her brother, though she was forsaking him—how and where she had
gone. “He will give you your orders about my things,” she said to Barbara,
who was in the highest state of restrained excitement, feeling, as all the
household had begun to feel, that something strange must have happened.
“Oh, Miss Clare, you’ve never gone and quarrelled with master?” the girl
cried, ready to weep. “No; I will never quarrel with him. I could not quarrel
with him,” cried Clare. “How could you think so. Did you ever see so kind
a brother?” “Never, Miss!” cried Barbara, fervently; and Clare paused and
cried: but then drew the veil over her face, and set out alone—into a new
world.
She paused for a moment, lingering on the steps, and gave a wistful look
round her, hoping, she said to herself, that she would see nobody—but
rather, poor Clare, with a wistful longing to see some one—to have her path
intercepted. But no one was visible. Edgar was still in the library with Mr.
Fazakerly. Arthur Arden was—no one knew where. The whole world stood
afar off, still and indifferent, letting her do what she pleased, letting her
leave her father’s house. She stood on the doorstep, with nobody but
Wilkins in sight, and took leave of the place where she was born. Had she
been called upon to leave it under any other circumstances, her whole mind
would have been occupied by the pang of parting from Arden. Now Arden
had the lightest possible share in her pain—so little that she scarcely
remembered it. She had so many more serious matters to grieve over. She
forgot even, to tell the truth, that she was leaving Arden. She looked round,
not to take farewell of her home, but to see if there was no shadow
anywhere of some one coming, or some one going. She looked all round,
deep into the shade of the trees, far across the glimmer of the fish pond. All
was silent, deserted, lonely. The moment had come when she must step
forth from the shelter in which she had spent all her life.
The avenue sloped gently downward to the village, and yet Clare felt it
as hard as a mountainside. She seemed to herself to be toiling along,
spending all her strength. For she was so solitary—no one to lend her an
arm or a hand; no one to comfort her, or even to say the way was long. She
was (she believed) a scorned and forsaken woman. Heaven and earth were
made bitter to her by the thought. Once more she looked round, a final
double farewell. He might even have been roused, she thought, by the
sound of her step crossing the hall, by Wilkins swinging open the door for
her, as he always did when any Arden went or came; for others, for the
common world, it was open enough, as it stood usually at half its width. Oh,
how slight a noise would have roused her, how faint a sound, had it been
Arthur who was going away! She bethought herself of an expedient she had
heard of—swallowing her own pride in the vehemence of her feelings. She
wished for him with all her heart, making a vehement conscious exertion of
her will. She cried out within herself, Arthur! Arthur! Arthur! It was a kind
of Pagan prayer, addressed not to God, but to man. Such a thing had been
known to be effectual. She had read in books, she had heard from others,
that such an appeal made, with all the heart, is never unsuccessful; that the
one will thus exerted affects the other unerringly; and that the name thus
called sounds in the ears of its owner, calling him, wherever he may be.
Therefore she did it, and watched its effect with a smothered excitement not
to be described. But there was no effect; the park spread out behind her, the
avenue ran into two lines of living green before. She was the only human
creature on the scene—the only being capable of this pain and anguish. She
drew her veil close, and went her way, with an indignation, a resentment, a
rush of shame, greater than anything she had felt in all her life. She had
called him, and he had not come. She had stooped her pride, and humbled
herself, and made that effort, and there had been no response. Now, it was,
it must be, over for ever, and life henceforward contained nothing for her
worth the trouble of existing for.
It was thus that Clare left Arden, the old home of her race, her birthplace,
the place which was, she would have said, everything to her—without even
thinking of it or caring for it, or making any more account of it than had it
been the veriest hired house. She was not aware of her own extraordinary
indifference. Had any one met her, had her feelings been brought under her
own notice, she would have said, beyond any dispute, that her heart was
breaking to leave her home. But nobody met her to thrust any such question
upon her, and the stronger feeling swallowed up the weaker, as it always
does. All the way down the avenue not a creature, not even a servant, or a
pensioner from the village—though on ordinary occasions there was always
some one about—broke the long silent expanse of way. She was suffered to
go without a remonstrance, without a question, from any living creature.
Already it appeared the tie was broken between her and the dwelling so
familiar to her—the place which had known her already began to know her
no more.
Mr. Fielding was in his study when Clare went in upon him veiled and
cloaked—a figure almost funereal. She gave him a great start and shock,
which was scarcely softened when she raised her veil. “Something more has
happened?” he said; “something worse—Edgar has gone away? My poor
child, tell me what it is——”
“It is nothing,” said Clare. “Edgar is quite safe, so far as I know. But I
have left Arden, Mr. Fielding. I have left it for ever. Till my brother can
make some arrangement for me, may I come here?”
“Here!” cried the good Rector, in momentary dismay.
“Yes—you have so often said you felt me like a child of your own; I will
be your child, dear Mr. Fielding. Don’t make me feel I have lost everything
—everything, all in a day.”
“My dear! my dear!” cried Mr. Fielding, taking her into his old arms,
“don’t cry so, Clare; oh, my poor child, don’t cry. Of course, you shall come
here—I shall be too happy, too pleased to have you. Of that you may be
quite sure. Clare, my darling, it is not like you—oh, don’t cry!”
“It is a relief,” she said. “Think—I have left Arden, where I was born,
and where I have lived all my life; and you are the only creature I can come
to now.”
“My poor child!” said the kind Rector. Yes, she who had been so proud
of Arden, so devoted to the home of her race, it was not wonderful that she
should feel the parting. He soothed her, and laid his kind hand on her head,
and blessed her. “My dear, you have quantities of friends. There is not a
man or woman in the county, far or near, but is your friend, Clare,” he said;
“and Edgar will always be a brother to you; and you are young enough to
form other ties. You are very young—you have your whole life before you.
Clare, my dearest child, you would have left Arden some time in the course
of nature. It is hard, but it will soon be over—and you are welcome to me as
the flowers in May.”
She had known he would be kind to her—it had required no wizard to
foresee that; and the old man’s tenderness made less impression upon her
than if it had been unlooked for. She composed herself and dried her tears,
pride coming to her aid. Yes, everybody in the county would be her friend.
She was still an Arden of Arden, though Edgar was an alien. No one could
take from her that natural distinction. Her retirement was a proud one—not
forced. She could not be mistaken in any way. If it had been but Arden she
was leaving, she would have got over it very soon, and taken refuge in her
pride. But there was more than Arden in question—more than Edgar—
something which she could confide to no mortal ears.
Then she was conducted by the Rector through all the house, that she
might choose her room. “There are none of them half pretty enough,” he
said. “If we had known we had a princess coming, we would have done our
best to prepare her a bower. This one is very bright and sunny, and looks out
on the garden; and this is the best room—the one Mrs. Solmes thinks most
of. You must take your choice, and it shall be made pretty for you, Clare. I
know, I once knew, how a lady should be lodged. Yes, my dear, you have
but to choose.”
“It does not matter,” Clare said, almost coldly. She did not share the
good man’s pleasant flutter. It was gain to him, and only loss to her. She
threw off her cloak and her hat in the nearest room, without any interest in
the matter—an indifference which checked the Rector in the midst of his
eager hospitalities. “Don’t mind me,” she said, “dear Mr. Fielding; go on
with your work—don’t take any notice of me. I shall go into the drawing-
room, and sit there till you have finished. Never mind me——”
“I have to go out,” the Rector said, with a distressed face. “There are
some sick people who expect me. But Clare, you know, you are mistress
here—entirely mistress. The servants will be too proud to do anything you
want; and the house is yours—absolutely yours——”
“The house is mine!” Clare said to herself, when he was gone, with a
despite which was partly the result of her mortification and grief. As if she
cared for that—as if it was anything to her being mistress there, she who
had been mistress of Arden! She sat down by herself in the old-fashioned,
dingy drawing-room—the room which Mr. Fielding had furnished for his
Milly nearly fifty years before, and where, though everything was familiar,
nothing was interesting. She could not read, even though there had been
anything to read. She had nothing to work at, even had she cared to work.
She sat all alone, idle, unoccupied—a prey to her own thoughts. There is
nothing in the world more painful than the sudden blank which falls upon
an agitated spirit when thus turned out of confusion and excitement into the
arbitrary quiet of a strange house—a new scene. Clare walked about the
room from window to window, trying vainly to see something where there
was nothing to see—the gardener rolling the grass, old Simon clamping
past the Rectory gate in his clogs, upon some weird mission to the
churchyard. Impatience took possession of her soul. When she had borne it
as long as she could, she ran upstairs for her hat, and went across the road
to the Doctor’s house, which irritated her, twinkling with all its windows in
the slanting sunshine. Miss Somers could not be much consolation, but at
least she would maunder and talk, and give Clare’s irritation vent in another
way. The silence, the quiet, the peace, were more than she could bear.
CHAPTER XXV.
Miss Somers was seated very erect on her sofa when Clare went in—more
erect than she had been known to be for many a day—and was at the
moment engaged in a discussion with Mercy, which her visitor could not
but hear. “I don’t believe it was Clare,” Miss Somers was saying; “not that I
mean you are telling a story—oh, no! I should as soon think—— But Clare
will break her heart. She was always so—— And if ever a brother deserved
it—— Oh, the poor dear—— I don’t mean to say a word against my brother
—he is very, very—— But, then, as to being feeling, and all that—— If you
are never ill yourself, how are you to know? But, Edgar, oh!—the tender
heartedest, feelingest—— She never, never could—— Oh, can it be—is it
—Clare?”
“Yes,” said Clare, with her haughtiest look. “And I think you were
discussing us, Miss Somers—please don’t. I do not like it, nor would my
brother. Talk of us to ourselves as you like, but to others—don’t, please.”
“Mercy,” Miss Somers said, hastily interrupting her, “I must have some
more wool to finish these little—white Andalusian—— Mrs. Horsfall at the
post-office—you must run now. Only fancy if I had not enough to finish—
and that dear little—— Run—there’s a good woman, now. O Clare, my
dear!” she added, out of breath, as the maid sulkily withdrew; “it isn’t that I
would take upon me—— Who am I that I should find fault? but other
people’s feelings, you know—though you were only a servant—— What
was I saying, my dear?—that Edgar was the best, the very best—— And so
he is. I never saw any one—not any one—so unselfish, and so—— O
Clare! nobody should know it so well as you.”
“Nobody knows it so well as me,” said Clare. She had come with a kind
of half hope of sympathy, thinking at least that it would be a relief to let her
old friend run on, and talk the whole matter over as pleased her. But now
her heart closed up—her pride came uppermost. She could not bear the idea
of being discussed, and made the subject of talk to all the village. “But I
object to being gossiped about,” she said.
“Dear,” said Miss Somers, in her soft voice, “it is not gossip when—and
I love you both. I feel as if I was both your mothers. Oh, Clare! when I used
to have my little dreams sometimes—when I thought I had quite a number,
you know, all growing up—there were always places for Edgar and you.
Oh, Clare! I don’t understand. The Doctor you know—he has so many
things to think of—and then gentlemen are so strange—they expect you to
know everything without—— Oh, what is it that has happened? Something
about Edgar—that he was changed at nurse—or something. I am not very
clever, I know, but you understand everything, Clare. Oh, what is it?—
Arthur Arden and Edgar—but it is not Arthur that is your——? It is Edgar
that was—and something about that Scotch person and Mr. Fazakerly, and
—oh, Clare, it makes the whole house swim, and my poor head——”
“I cannot speak of it,” said Clare. “Oh, Miss Somers, don’t you
understand?—how can I speak of it. I would like to forget it all—to die, or
to go away——”
“Oh, hush, my dear—oh, hush,” said Miss Somers, with a scared face;
“don’t speak of such—and then, why should you? You will marry, you
know, you will be quite, quite—and all this will pass away. Oh, as long as
you are young, Clare—anything may happen. Brothers are very nice,” said
Miss Somers, shaking her head softly, “but to give yourself up, you know—
and then they may marry; the Doctor never did—if he had brought home a
wife, I think often—— Though, to be sure, it might have been better, far
better. But a brother is never like—he may be very nice; and I am sure
Edgar—— But, on the whole, Clare, my dear, a house of your own——”
Clare was silent. Her mind had wandered away to other matters. A house
of her own! The Rector had said that his house was hers, and the thought
had not consoled her. Was it possible that in the years to come, in some dull
distant time she too might consent, like other girls, to marry somebody—
that she might have a house of her own. In the sudden change that had
overwhelmed her this dream had come like many others. Was it possible
that she could no longer command her own destiny, that the power of
decision had gone out of her hands. Bitterness filled her heart; a bitterness
too deep to find any outlet in words. A little while ago she had been
conscious that it was in her power to make Arthur Arden’s life wealthy and
happy. Now she had been tossed from her elevation in a moment, and the
power transferred to him; and he showed no desire to use it. He was silent,
condemning her to a blank of suspense, which chafed her beyond
endurance. She said to herself it was intolerable, not to be borne. She would
think of him no more; she would forget his very name. Would he never
come? would he never come?
“I don’t pretend to understand, my dear,” said Miss Somers humbly;
“and if it distresses you, of course—— It is all because the Doctor is so
hasty; and never, never will—— And then he expects me to understand.
But, anyhow, it will stop the marriage, I suppose. The marriage, you know
—— Gussy Thornleigh, of course. I am so sorry—— I think she is such a
nice girl. Not like you, Clare; not beautiful nor——; but such a nice—— I
was so pleased—— Dear Edgar, he will have to wait, and perhaps she will
see some one else, or he—— Gentlemen are always the worst—— But, of
course, Clare, the marriage must be put off——”
“I don’t know of any marriage,” said Clare.
“Oh, my dear, I heard—— I am not of much account, but still I have
some friends; and in town, you know, Clare. They were always——; and
everybody knew. Poor Edgar! he must be very, very—— He is so
affectionate and—— He is one of the men that throw themselves upon your
sympathy—and you must give him your—— Clare, my dear! are they to
share Arden between them?—or is Edgar to be Arthur, you know? Oh! I do
wish you would tell me, Clare.”
“Mr. Arthur Arden has everything,” said Clare raising her head. “It all
belongs to him. My brother has no right. Oh, Miss Somers, please don’t
make me talk!”
“That is just what I said,” said Miss Somers; “and oh, my dear, don’t be
unhappy, as if it were death or——, when it is only money. I always say
—— And then he is so young; he may marry, or a hundred things. So,
Arthur is Edgar now? but he is not your—— I don’t understand it, Clare.
He is a great deal more like you, and all that; but he was born years before
your poor, dear mamma—— Oh, I remember quite well—before the old
Squire was married—so it is impossible he could be your—— I daresay I
shall have it clear after a while. Edgar is found out to be Arthur, and Arthur
Edgar, but only not your—— And then, Clare, if you will but think—how
could they be changed at nurse? for Arthur was a big fellow when your
poor, dear mamma—— You could not mistake a big boy of ten, with boots
and all that, you know, for a little baby—— Oh, I am so fond of little
babies! I remember Edgar, he was such a—— But Arthur was a
troublesome, mischievous boy—— I can’t make out, I assure you, how it
could be——”
Again Clare made no reply. She sat and pursued her own thoughts,
leaving the invalid in her confused musings to make the matter out as best
she could. It was better to be here, even with Miss Somers’ babble in her
ears, than alone in the awful solitude of the Rectory, with nothing to break
the current of her thoughts. Miss Somers waited a few minutes for an
answer, but, receiving none, returned to her own way of making matters
out.
“If Edgar is in want—of—anything, Clare—— I mean, you know——
Money is always nice, my dear. Whatever one may want—— Oh, I know
very well it cannot buy—— but still—— And then there is that nice chair:
he was so very kind—— Clare,” she said, sitting up erect, “if it is all true
about their being changed, and all that, why, it was Arthur’s money, not
Edgar’s; and I am sure if I had been shut up for a hundred years—— I am
not saying anything against your cousin—— but it would never have
occurred to him, you know—— Clare, perhaps I ought to send it back——”
“I hope you don’t think my cousin is a miser or a tyrant,” said Clare,
flushing suddenly to her very hair.
“Oh, no, no, dear—— But then one never knows—— Mr. Arthur Arden
is not a miser, I know. I should not like to say—— He is fond of what
belongs to him, and—— He is not at all like—— My dear, I never knew
any one like Edgar. Other gentlemen may be kind—— I daresay Mr. Arthur
Arden is kind—— but these things would never come into his head—— He
is a man that is very fond of—— Well, my dear, it is no harm. One ought to
be rather fond of oneself—— But Edgar—— Clare——”
“Edgar is a fool!” cried Clare, with passion. “He is not an Arden; he
would give away everything—his very life, if it would serve anybody. Such
men cannot live in the world; it is wicked—it is wrong. When God sent us
into the world, surely He meant we were to take care of ourselves.”
“Did he?” said Miss Somers, softly. She was roused out of her usual
broken talk. “Oh, Clare, I am not clever, to talk to you. But if that is what
God meant, it was not what our Saviour did. He never took care of Himself
—— He took care—— Oh, my dear, is not Edgar more like—— Don’t you
understand?”
Once more Clare made no reply. A cloud enveloped her, mentally and
physically—a sourd misery, inarticulate, not defining itself. Why should
Edgar, why should any one, thus resign their own happiness? Happiness
was the better part of life, and ought there not to be a canon against its
renunciation as well as against self-murder? Self-murder was nothing to it.
To give up your identity, your real existence, all the service you could do to
God or man, was not that worse than simply taking your own life? So Clare
asked herself. And this was what Edgar had done. He had not considered his
duty at all in the matter. He had acted on a foolish, generous impulse, and
thrown away more than his existence. Then, as she sat and pursued the
current of her thoughts, she remembered that but for her, Edgar, in the
carelessness of his security, would never have looked at those papers, would
never have thought of them. It was she, and she only, who was to blame.
Oh, what fancies had been in her mind—visions of wrong to Arthur, of the
duty that was upon herself to right him! To right him who cared nothing for
her, who was ready to let her sink into the abyss, whose heart did not impel
him towards her, whose hand had never sought hers since he knew—— It
was her fault, not Edgar’s, after all.
“I am not one to preach,” said Miss Somers, faltering. “I know I never
was clever; but oh, Clare, when one only thinks—— What a fuss we make
about ourselves, even me, a helpless creature! We make such a fuss—and
then—— As if it mattered, you know. But our Saviour never made any fuss
—never minded what happened. Oh, Clare! If Edgar were like that—and he
is so, so—— Oh, I don’t know how to express myself. Other people come
always first with him, not himself. If he was my brother, oh, I would be so
—— Not that I am saying a word against the Doctor. The Doctor is very,
very—— But not like Edgar. Oh! if I had such a brother, I would be proud
——”
“And so am I,” said Clare, rising with a revulsion of feeling
incomprehensible to herself. “He is my brother. Nothing can take him away
from me. I will do as he does, and maintain him in everything. Thank you,
dear Miss Somers. I will never give Edgar up as long as I live——”
“Give Edgar up!” cried Miss Somers in consternation—“I should think
not, indeed, when everybody is so proud—— It is so sweet of you, dear, to
thank me—as if what I said could ever—— It is all Edgar’s doing—instead
of laughing, you know, or that—— And then it makes others think—she
cannot be so silly after all—I know that is what they say. But, oh! Clare,
I’m not clever—I know it—and not one to——, but I love you with all my
heart!——”
“Thanks, dear Miss Somers,” cried Clare, and in her weariness and
trouble, and the revulsion of her thoughts, she sat down resolving to be very
good and kind, and to devote herself to this poor woman, who certainly was
not clever, nor clear-sighted, nor powerful in any way, but yet could see
further than she herself could into some sacred mysteries. She remained
there all the afternoon reading to her, trying to keep up something like
conversation, glad to escape from her own thoughts. But Miss Somers was
trying for a long stretch. It was hard not to be impatient—hard not to
contradict. Clare grew very weary, as the afternoon stole on, but no one
came to deliver her. No one seemed any longer to remember her existence.
She, who could not move a few days since without brother, suitor, anxious
servants to watch her every movement, was left now to wander where she
would, and no one took any notice. To be sure, they were all absorbed in
more important matters; but then she had been the very most important
matter of all, both to Edgar and Arthur, only two days ago. Even, she
became sensible, as the long afternoon crept over, that there had been a
feeling in her heart that she must be pursued. They would never let her go
like this, the two to whom she was everything in the world. They would
come after her, plead with her, remonstrate, bid her believe that whosoever
had Arden, it was hers most and first of all. But they had not done so. Night
was coming on, and nobody had so much as inquired where she was. They
had let her go. Perhaps in all the excitement they were glad to be quit of her.
Could it be possible? Thus Clare mused, making herself it is impossible to
say how miserable and forlorn. Ready to let her go; glad to be rid of her.
Oh, how she had been deceived! And it was these two more than any other
who had taught her to believe that she was in some sort the centre of the
world.
Some one did come for Clare at last, making her heart leap with a
painful hope; but it was only Mr. Fielding, coming anxiously to beg her to
return to dinner. She put on her hat, and went down to him with the paleness
of death in her face. Nobody cared where she went, or what she did. They
were glad that she was gone. The place that had known her knew her no
more.
CHAPTER XXVI.
It is unnecessary to say that to one at least of the two people whose
behaviour she thus discussed in her heart Clare was unjust. Edgar had
neither forgotten her nor was he glad to be rid of her. It was late before he
knew that she was gone. All the afternoon of that day he had spent with the
lawyer, going over again all the matters which only two months ago had
been put into the hands of the heir. Mr. Fazakerly had ceased to
remonstrate. Now and then he would shake his head or shrug his shoulders,
in silent protest against the mad proceeding altogether, but he had stopped
saying anything. It was of no use making any further resistance. His client
had committed himself at every step; he had thrown open his secret
ostentatiously to all who were concerned—ostentatiously, Mr. Fazakerly
said with professional vehemence, feeling aggrieved in every possible way.
Had he been called upon to advise in the very beginning, it is most likely
that the task would have tried him sorely; for his professional instinct to
defend and conceal would have had all the force of a conscience to contend
with. But now that he had not been consulted, he was free to protest. When
he found it no longer of any use to make objections in words, he shook his
head—he shrugged his shoulders—he made satirical observations whenever
he could find an opportunity. “Were there many like you, Mr. Edgar,” he
said, “we lawyers might shut up shop altogether. It is like going back to the
primitive ages of Christianity. Let not brother go to law against brother is, I
know, the Scriptural rule; though it is generally the person who is attacked
who says that—the one who has something to lose. But you have gone
beyond Scripture; you have not even asked for arbitration or compensation;
you have thrown away everything at once. We might shut up shop
altogether if everybody was like you.”
“If I were disagreeable,” said Edgar, laughing, “I should say, and no
great harm either, according to the judgment of the world.”
“The world is a fool, Mr. Edgar,” said Mr. Fazakerly.
“It is very possible,” said Edgar, with a smile. This was at the
termination of their business, when he felt himself at last free from all the
oft-repeated consultations and discussions of the last two or three days.
Everything was concluded. The old lawyer had his full instructions what he
was to do, and what to say. Edgar gave up everything without reservation,
and, at the instance of Mr. Fazakerly, consented to receive from his cousin a
small sum of money, enough to carry him abroad and launch him on the
world. He had been very reluctant to do this, but Mr. Fazakerly’s strenuous
representations had finally silenced him. “After all, I suppose the family
owes it me, for having spoiled my education and career,” Edgar said, with
the half smile, half sigh which had become habitual to him; and then he was
silent, musing what his career would have been had he been left in his
natural soil. Perhaps it would have been he who should have ploughed the
little farm, and kept the family together; perhaps he might have been a
sailor, like Willie who was lost—or a doctor, or a minister, like others of his
race. How strange it was to think of it! He too had a family, though not the
family of Arden. His life had come down to him through honest hands,
across the homely generations—not peasants nor gentlefolk, but something
between—high-minded, righteous, severe people, like the woman who was
the only representative of them he knew, his mother’s mother. His heart beat
with a strange sickening speed when he thought of her—a mixture of
repulsion and attraction was in his thoughts. How was he to tell Clare of
her? He felt that nothing which had yet occurred would so sever him from
his sister as the appearance by his side of the two strangers who were his
flesh and blood. And then he remembered that in the sickness of his heart he
had made no inquiry after Jeanie during that whole long day.
When he went out into the hall he found boxes standing about, a sight
which struck him with surprise, and Barbara standing, bonneted and
cloaked, among them. She turned to him the moment he appeared, with an
eager appeal. “Please, sir, Miss Clare said as I was to ask you what to do.”
“I will speak to my sister,” said Edgar in his ignorance; but Barbara put
out her hand to detain him.
“Oh, sir, please! Miss Clare has gone down to the Rectory. She said to
me as I was to ask you what to do with all these things. There are a deal of
things, sir, to go to the Rectory. The rooms is small—and you was to tell
me, please, what to do. Don’t you think, sir, if I was to leave the heavy
things here——”
“Nothing must stay here,” said Edgar peremptorily. He was more angry
at this suggestion than at anything which had yet been said. “Take them all
away—to the Rectory—where Miss Arden pleases; everything must go.”
He was not aware while he spoke that Arthur Arden had made his
appearance and stood looking at him, listening with a certain bitterness to
all he said.
“That seems hard laws,” said Arthur. “I am Miss Arden’s nearest
relative. It may be necessary that she should go at present; but why should
you take upon you to pronounce that nothing shall stay?”
“I am her brother,” said Edgar gravely. “Mr. Arden, you will find Mr.
Fazakerly in the library with a communication to make to you. Be content
with that, and let me go my own way.”
“No, by Jove!” cried Arthur; “not if your way includes that of Clare.
What business have you, who are nothing to her, to carry her away?”
The servants stood gaping round, taking in every word. Mr. Fazakerly,
alarmed by the sound of the discussion, came to the door; and Edgar made
the discovery then, to his great surprise, that it hurt him to have this
revelation made to the servants. It was a poor shabby little remnant of pride,
he thought. What was the opinion of Wilkins or of Mrs. Fillpot to him? and
yet he would rather these words had been spoken in his absence. But the
point was one in which he was resolute not to yield. He gave his orders to
Wilkins peremptorily, without so much as looking at the new heir. And then
he himself went out, glad—it is impossible to say how glad—to escape
from it all. He gave a sigh of relief when he emerged from the Arden
woods. Even that avenue he had been so proud of was full of the heavy
atmosphere of pain and conflict. The air was freer outside, and would be
freer still when Arden itself and everything connected with it had become a
thing of the past. When he reached the Rectory, Mr. Fielding was about
sitting down to dinner, with Clare opposite to him—a mournful meal, which
the old man did his best to enliven, although the girl, worn out in body and
mind, was incapable of any response. Things were a little better, to Mr.
Fielding at least, when Edgar joined them; but Clare could scarcely forgive
him when she saw that he could eat, and that a forlorn inclination for rest
and comfort was in her brother’s mind in the midst of his troubles. He was
hungry. He was glad of the quiet and friendly peace of the familiar place.
Oh, he was no Arden! every look, every word bore out the evidence against
him.
“It looks unfeeling,” he said, “but I have neither eaten nor slept for two
days, and I am so sick of it all. If Clare were but safe and comfortable, it
would be the greatest relief to me to get away——”
“Clare is safe here. I don’t know whether she can make herself
comfortable,” said the Rector looking at her wistfully. “Miss Arden, from
Estcombe, would come to be with you, my dear child, I am sure, if that
would be any advantage—or good Mrs. Selden——”
“I am as comfortable as I can be,” said Clare, shortly. “What does it
matter? There is nothing more necessary. I will live through it as best I
can.”
“My dear child,” said good Mr. Fielding, after a long pause; “think of
Edgar—it is worse for him than for you——”
“No,” cried Clare passionately; “it is not worse for him. Look, he is able
to eat—to take comfort—he does not feel it. Half the goodness of you good
people is because you don’t feel it. But I—— It will kill me——”
And she thrust back her chair from the table, and burst into passionate
tears, of which she was soon ashamed. “Edgar does not mind,” she cried;
“that is worst of all. He looks at me with his grieved face, and he does not
understand me. He is not an Arden, as I am. It is not death to him, as it is to
me.”
Edgar had risen and was going to her, but he stopped short at the name
of Arden. It felt to him like a stab—the first his sister had given him. “I
hope I shall not learn to hate the name of Arden,” he said between his
closed lips; and then he added gently, “So long as I am not guilty, nothing
can be death to me. One can bear it when one is but sinned against, not
sinning; and you have been an angel to me, Clare——”
“No,” she cried, “I am no angel; I am an Arden. I know you are good;
but if you had been wicked and concealed it, and stood by your rights, I
should have felt with you more!”
It was in the revulsion of her over-excited feelings that she spoke, but yet
it was true. Perhaps it was more true than when she had stood by Edgar and
called him her dearest brother; but it was the hardest blow he had yet had to
bear. He sat down again, and covered his face with his hands. Poor fellow!
the little comfort he had been so ready to enjoy, the quietness and
friendliness, the food and rest, had lost all savour for him now. Mr. Fielding
took his hand and pressed it, but that was only a mild consolation. After a
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
ebookbell.com