Java Pocket Guide 1st Edition Liguori - Own The Ebook Now With All Fully Detailed Content
Java Pocket Guide 1st Edition Liguori - Own The Ebook Now With All Fully Detailed Content
com
https://ebookgate.com/product/java-pocket-guide-1st-edition-
liguori/
OR CLICK BUTTON
DOWLOAD EBOOK
https://ebookgate.com/product/scja-sun-certified-java-associate-study-
guide-exam-cx-310-019-certification-press-1st-edition-robert-liguori/
ebookgate.com
https://ebookgate.com/product/pocket-rough-guide-paris-rough-guide-
pocket-guides-ruth-blackmore/
ebookgate.com
https://ebookgate.com/product/echocardiography-pocket-guide-bernard-
bulwer/
ebookgate.com
https://ebookgate.com/product/pocket-guide-to-knots-lindsey-philpott/
ebookgate.com
The JavaScript Pocket Guide 1st Edition Lenny Burdette
https://ebookgate.com/product/the-javascript-pocket-guide-1st-edition-
lenny-burdette/
ebookgate.com
https://ebookgate.com/product/pocket-guide-to-radiation-oncology-1st-
edition-daniel-chamberlain/
ebookgate.com
https://ebookgate.com/product/java-studio-creator-field-guide-
anderson/
ebookgate.com
https://ebookgate.com/product/linux-pocket-guide-2nd-edition-daniel-j-
barrett/
ebookgate.com
https://ebookgate.com/product/the-nintendo-wii-pocket-guide-1st-
edition-bart-g-farkas/
ebookgate.com
www.it-ebooks.info
www.it-ebooks.info
Java ™
Pocket Guide
www.it-ebooks.info
www.it-ebooks.info
Java ™
Pocket Guide
www.it-ebooks.info
Java™ Pocket Guide
by Robert Liguori and Patricia Liguori
Copyright © 2008 Robert Liguori and Patricia Liguori. All rights reserved.
Printed in Canada.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales
promotional use. Online editions are also available for most titles
(safari.oreilly.com). For more information, contact our corporate/
institutional sales department: (800) 998-9938 or [email protected].
Printing History:
March 2008: First Edition.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are
registered trademarks of O’Reilly Media, Inc. The Pocket Guide series
designations, Java Pocket Guide, the image of a Javan tiger, and related trade
dress are trademarks of O’Reilly Media, Inc.
Java™ and all Java-based trademarks and logos are trademarks or registered
trademarks of Sun Microsystems, Inc., in the United States and other countries.
Many of the designations used by manufacturers and sellers to distinguish
their products are claimed as trademarks. Where those designations appear
in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the
designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the
publisher and authors assume no responsibility for errors or omissions, or
for damages resulting from the use of the information contained herein.
ISBN: 978-0-596-51419-8
[TM]
www.it-ebooks.info
Contents
Preface xi
Part I. Language
www.it-ebooks.info
Separators 10
Operators 10
Literals 12
Escape Sequences 15
Unicode Currency Symbols 15
vi | Contents
www.it-ebooks.info
Static Data Members, Static Methods, and Static Constants 44
Interfaces 46
Enumerations 46
Annotations Types 47
Contents | vii
www.it-ebooks.info
Part II. Platform
viii | Contents
www.it-ebooks.info
Chapter 13: Generics Framework 114
Generic Classes and Interfaces 114
Constructors with Generics 115
Substitution Principle 115
Type Parameters, Wildcards, and Bounds 116
The Get and Put Principle 117
Generic Specialization 118
Generic Methods in Raw Types 119
Contents | ix
www.it-ebooks.info
Chapter 17: Third-Party Tools 142
Development Tools 142
Libraries 144
IDEs 144
Web Application Platforms 145
Scripting Languages 147
Index 159
x | Contents
www.it-ebooks.info
Chapter 1
Preface
Book Structure
This book is broken into two sections: language and plat-
form. Chapters 1 through 8 detail the Java programming lan-
guage as derived from the Java Language Specification (JLS).
Chapters 9 though 18 detail Java platform components and
related topics.
xi
www.it-ebooks.info
Font Conventions
Italic
Denotes filenames, file extensions (such as .java), and
directory paths.
Constant width
Denotes class names, types, methods, data members,
commands, properties, and values.
Constant width italic
Indicates user-supplied values.
xii | Preface
www.it-ebooks.info
Authors
Robert Liguori is a Senior Software Engineer for Management,
Engineering and Technology Associates, Inc. Patricia Liguori is
a Lead Information Systems Engineer for The MITRE Corpora-
tion. The authors may be contacted in regards to comments,
questions, or errata found in this book at [email protected].
Acknowledgments
We extend a special thank you to our editor, Mike Loukides.
His Java prowess, responsiveness, and ongoing collaboration
have made writing this book an enjoyable experience.
Appreciation goes out to our technical reviewers and sup-
porters: Mary-Ann Boyce, Kelly Connolly, Edward Finegan,
David Flanagan, David King, Chris Magrin, Confesor Santi-
ago, Wayne Smith, Martin Suech, and our families.
Dedication
This book is dedicated to our daughter, Ashleigh.
Preface | xiii
www.it-ebooks.info
www.it-ebooks.info
PART I
I. Language
www.it-ebooks.info
www.it-ebooks.info
CHAPTER 1
Naming Conventions
Class Names
Class names should be nouns, as they represent “things” or
“objects.” They should be mixed case with only the first let-
ter of each word capitalized.
public class Fish {...}
Interface Names
Interface names should be adjectives. They should end with
“able” or “ible” whenever the interface provides a capability;
otherwise, they should be nouns. Interface names follow the
same capitalization convention as class names.
public interface Serializable {...}
public interface SystemPanel {...}
Method Names
Method names should contain a verb, as they are used to
make an object take action. They should be mixed case,
beginning with a lowercase letter, and the first letter of each
www.it-ebooks.info
internal word should be capitalized. Adjectives and nouns
may be included in method names.
public void locate( ) {...} // verb
public String getWayPoint( ) {...} // verb and noun
www.it-ebooks.info
Constant Names
Constant names should be all uppercase letters, and multi-
ple words should be separated by underscores.
public static final int MAX_DEPTH = 200;
Enumeration Names
Enumeration names should follow the conventions of class
names. The enumeration set of objects (choices) should be
all uppercase letters.
enum Battery {CRITICAL, LOW, CHARGED, FULL}
Package Names
Package names should be unique and consist of lowercase
letters. Underscores may be used if necessary.
package com.oreilly.fish_finder
Acronyms
When using acronyms in names, only the first letter of the
acronym should be uppercase and only when uppercase is
appropriate.
public String getGpsVersion( ) {...}
Acronyms | 5
www.it-ebooks.info
CHAPTER 2 CHAPTER 2
Lexical Elements
TIP
Java comments, identifiers, and string literals are not lim-
ited to ASCII characters. All other Java input elements are
formed from ASCII characters.
www.it-ebooks.info
Printable ASCII Characters
ASCII reserves code 32 (spaces) and codes 33 to 126 (letters,
digits, punctuation marks, and a few others) for printable
characters. Table 2-1 contains the decimal values followed by
the corresponding ASCII characters for these codes.
Table 2-1. Printable ASCII characters
32 SP 48 0 64 @ 80 P 96 ' 112 p
33 ! 49 1 65 A 81 Q 97 a 113 q
34 " 50 2 66 B 82 R 98 b 114 r
35 # 51 3 67 C 83 S 99 c 115 s
36 $ 52 4 68 D 84 T 100 d 116 t
37 % 53 5 69 E 85 U 101 e 117 u
38 & 54 6 70 F 86 V 102 f 118 v
39 ` 55 7 71 G 87 W 103 g 119 w
40 ( 56 8 72 H 88 X 104 h 120 x
41 ) 57 9 73 I 89 Y 105 i 121 y
42 * 58 : 74 J 90 Z 106 j 122 z
43 + 59 ; 75 K 91 [ 107 k 123 {
44 , 60 < 76 L 92 \ 108 l 124 |
45 - 61 = 77 M 93 ] 109 m 125 }
46 . 62 > 78 N 94 ^ 110 n 126 ~
47 / 63 ? 79 O 95 _ 111 o
www.it-ebooks.info
Table 2-2. Non-printable ASCII characters
00 NUL 07 BEL 14 SO 21 NAK 28 FS
01 SOH 08 BS 15 SI 22 SYN 29 GS
02 STX 09 HT 16 DLE 23 ETB 30 RS
03 ETX 10 NL 17 DC1 24 CAN 31 US
04 EOT 11 VT 18 DC2 25 EM 127 DEL
05 ENQ 12 NP 19 DC3 26 SUB
06 ACK 13 CR 20 DC4 27 ESC
TIP
ASCII 10 is a newline or linefeed. ASCII 13 is a carriage
return.
Comments
A single-line comment begins with two forward slashes and
ends immediately before the line terminator character.
// A comment on a single line
www.it-ebooks.info
In Java, comments cannot be nested.
/* This is /* not permissible */ in Java */
Keywords
Table 2-3 contains the Java keywords. Two of them are
reserved but not used by the Java language: const and goto.
These C++ keywords are included as Java keywords to gen-
erate better error messages if they are used in a Java pro-
gram. Java 5.0 introduced the enum keyword.
TIP
Java keywords cannot be used as identifiers in a Java
program.
TIP
Sometimes true, false, and null literals are mistaken for
keywords. They are not keywords; they are reserved literals.
Keywords | 9
www.it-ebooks.info
Identifiers
A Java identifier is the name that a programmer gives to a
class, method, variable, etc.
Identifiers cannot have the same Unicode character sequence
as any keyword, boolean or null literal.
Java identifiers are made up of Java letters. A Java letter is a
character for which Character.isJavaIdentifierStart(int)
returns true. Java letters from the ASCII character set are
limited to the dollar sign, the underscore symbol, and upper-
and lowercase letters.
Digits are also allowed in identifiers, but after the first
character.
// Valid identifier examples
class TestDriver {...}
String myTestVariable;
int _testVariable;
Long $testVariable;
startTest(testVariable4);
Separators
Nine ASCII characters delimit program parts and are used as
separators. ( ), { }, and [ ] are used in pairs.
( ) { } [ ] ; , .
Operators
Operators perform operations on one, two, or three operands
and return a result. Operator types in Java include assignment,
arithmetic, comparison, bitwise, increment/decrement, and
class/object. Table 2-4 contains the Java operators listed in pre-
cedence order (those with the highest precedence at the top of
the table), along with a brief description of the operators and
their associativity (left to right or right to left).
www.it-ebooks.info
Table 2-4. Java operators
Precedence Operator Description Association
1 ++,-- Postincrement, Postdecrement R➝L
2 ++,-- Preincrement, Predecrement R➝L
+,- Unary plus, unary minus R➝L
~ Bitwise compliment R➝L
! Boolean NOT R➝L
3 new Create object R➝L
(type) Type cast R➝L
4 *,/,% Multiplication, division, remainder L➝R
5 +,- Addition, subtraction L➝R
+ String concatenation L➝R
6 <<, >>, >>> Left shift, right shift, unsigned right L➝R
shift
7 <, <=, >, >= Less than, less than or equal to, L➝R
greater than, greater than or equal to
instanceof Type comparison L➝R
8 ==, != Value equality and inequality L➝R
==, != Reference equality and inequality L➝R
9 & Boolean AND L➝R
& Bitwise AND L➝R
10 ^ Boolean XOR L➝R
^ Bitwise XOR L➝R
11 | Boolean OR L➝R
| Bitwise OR L➝R
12 && Conditional AND L➝R
13 || Conditional OR L➝R
14 ?: Conditional Ternary Operator L➝R
15 =,+=,-=, *=,/ Assignment Operators R➝L
=,%=,&=,^=,
|=, <<=, >>
=, >>>=
Operators | 11
www.it-ebooks.info
Literals
Literals are source code representation of values.
For more information on primitive type literals, see the “Lit-
erals for Primitive Types” section in Chapter 3.
Boolean Literals
Boolean literals are expressed as either true or false.
boolean isReady = true;
boolean isSet = new Boolean(false);
boolean isGoing = false;
Character Literals
A character literal is either a single character or an escape
sequence contained within single quotes. Line terminators
are not allowed.
char charValue1 = 'a';
// An apostrophe
Character charValue2 = new Character ('\'');
Integer Literals
Integer types (byte, short, int, and long) can be expressed in
decimal, hexadecimal, and octal. By default, integer literals
are of type int.
int intValue = 34567;
www.it-ebooks.info
Hexadecimal literals begin with 0x or 0X, followed by the
ASCII digits 0 through 9 and the letters a through f (or A
through F). Java is not case-sensitive when it comes to hexa-
decimal literals.
Hex numbers can represent positive and negative integers
and zero.
int hexValue = 0X64; // 100 decimal
Floating-Point Literals
A valid floating-point literal requires a whole number and/or
a fractional part, decimal point, and type suffix. An expo-
nent prefaced by an e or E is optional. Fractional parts and
decimals are not required when exponents or type suffixes
are applied.
A floating-point literal (double) is a double-precision floating
point of eight bytes. A float is four bytes. Type suffices for
doubles are d or D; suffices for floats are f or F.
[whole-number].[fractional_part][e|E exp][d|D|f|F]
Literals | 13
www.it-ebooks.info
String Literals
String literals contain zero or more characters, including escape
sequences enclosed in a set of double quotes. String literals
cannot contain Unicode \u000a and \u000d for line termina-
tors; use \r and \n instead. Strings are immutable.
String stringValue1 = new String("Valid literal.");
String stringValue2 = "Valid.\nMoving to next line.";
String stringValue3 = "Joins str" + "ings";
String stringValue4 = "\"Escape Sequences\"\r";
A string can be added to the pool (if it does not already exist
in the pool) by calling the intern( ) method on the string.
The intern( ) method returns a string, which is either a
reference to the new string that was added to the pool or a
reference to the already existing string.
String stringValue9 = new String("thatString");
String stringValue10 = stringValue9.intern( );
Null Literals
The null literal is of type null and can be applied to refer-
ence types. It does not apply to primitive types.
String n = null;
www.it-ebooks.info
Escape Sequences
Table 2-5 provides the set of escape sequences in Java.
Table 2-5. Character and string literal escape sequences
Name Sequence Decimal Unicode
Backspace \b 8 \u0008
Horizontal tab \t 9 \u0009
Line feed \n 10 \u000A
Form feed \f 12 \u000C
Carriage return \r 13 \u000D
Double quote \” 34 \u0022
Single quote \’ 39 \u0027
Backslash \\ 92 \u005C
www.it-ebooks.info
Table 2-7. Currency symbols within range
Name Symbol Decimal Unicode
Franc sign 8355 \u20A3
Lira sign 8356 \u20A4
Mill sign 8357 \u20A5
Rupee sign 8360 \u20A8
Euro sign 8364 \u20AC
www.it-ebooks.info
CHAPTER 3
Fundamental Types
Primitive Types
There are eight primitive types in Java; each is a reserved key-
word. They describe variables that contain single values of
the appropriate format and size; see Table 3-1. Primitive
types are always the specified precision, regardless of the
underlying hardware precisions (e.g., 32- or 64-bit).
Table 3-1. Primitive types
Type Detail Storage Range
boolean true or false 1 bit Not applicable
char Unicode character 2 bytes \u0000 to \uFFFF
byte integer 1 byte –128 to 127
short integer 2 bytes –32768 to 32767
int integer 4 bytes –2147483648 to
2147483647
long integer 8 bytes –263 to 263 –1
17
www.it-ebooks.info
Table 3-1. Primitive types (continued)
Type Detail Storage Range
float floating point 4 bytes 1.4e–45 to 3.4e+38
double floating point 8 bytes 5e–324 to 1.8e+308
TIP
Primitive types byte, short, int, long, float, and double
are all signed. Type char is unsigned.
www.it-ebooks.info
short seatingCapacity = 17157, vipSeats = (short) 500;
The short primitive has a four byte signed integer as its
valid literal. If an explicit cast is not performed, the inte-
ger is implicitly cast to two bytes.
int ppvRecord = 19800000, vs = vipSeats, venues = (int)
20000.50D;
The int primitive has a four byte signed integer as its
valid literal. When char, byte, and short primitives are
used as literals, they are automatically cast to four byte
integers, as in the case of the short value within vipSeats.
Floating-point and long literals must be explicitly cast.
long wins = 38L, losses = 4l, draws = 0, knockouts =
(long) 30;
The long primitive uses an eight byte signed integer as its
valid literal. It is designated by an L or l postfix. The
value is cast from four bytes to eight bytes when no post-
fix or cast is applied.
float payPerView = 54.95F, balcony = 200.00f, ringside =
(float) 2000, cheapSeats = 50;
The float primitive has a four byte signed floating point
as its valid literal. An F or f postfix or an explicit cast des-
ignates it. No explicit cast is necessary for an int literal
because an int fits in a float.
double champsPay = 20000000.00D, challengersPay =
12000000.00d, chlTrainerPay = (double) 1300000,
refereesPay = 3000, soda = 4.50;
The double primitive uses an eight byte signed floating
point value as its valid literal. The literal can have a D, d,
or explicit cast with no postfix. If the literal is an integer,
it is implicitly cast.
See Chapter 2 for more details on literals.
www.it-ebooks.info
Floating-Point Entities
Positive and negative floating-point infinities, negative zero,
and Not-a-Number (NaN) are special entities defined to
meet the IEEE 754-1985 standard; see Table 3-2.
The Infinity, –Infinity, and –0.0 entities are returned when
an operation creates a floating-point value that is too large to
be traditionally represented.
Table 3-2. Floating-point entities
Entity Description Examples
Infinity Represents the concept of positive infinity 1.0 / 0.0,
1e300 / 1e–300,
Math.abs (–1.0 / 0.0)
–Infinity Represents the concept of negative infinity –1.0 / 0.0,
1.0 / (–0.0),
1e300/–1e–300
–0.0 Represents a negative number close to zero –1.0 / (1.0 / 0.0),
–1e300 / 1e300
NaN Represents undefined results 0.0 / 0.0,
1e300 * Float.NaN,
Math.sqrt (–9.0)
www.it-ebooks.info
For example, column four’s heading entry (–0.0) and row
twelve’s entry (+ NAN) have a result of NaN, and could be writ-
ten as follows:
// 'NaN' will be printed
System.out.print((-0.0) + Double.NaN);
TIP
Any operation performed on NaN results in NaN; there is no
such thing as –NaN.
www.it-ebooks.info
Unary Numeric Promotion
When a primitive of a numeric type is part of an expression,
as listed in Table 3-4, the following promotion rules are
applied:
• If the operand is of type byte, short, or char, the type will
be promoted to type int.
• Otherwise, the type of the operand remains unchanged.
Table 3-4. Expression for unary promotion rules
Expression
Operand of a unary plus operator +
Operand of a unary minus operator –
Operand of a bitwise complement operator ~
All shift operators >>, >>>, or <<
Index expression in an array access expression
Dimension expression in an array creation expression
www.it-ebooks.info
Table 3-5. Operators for binary promotion rules
Operators Description
+ and – Additive operators
*, /, and % Multiplicative operators
<, <=, >, and >= Comparison operators
== and != Equality operators
&, ^, and | Bitwise operators
? : Conditional operator (see next section)
Wrapper Classes
Each of the primitive types has a corresponding wrapper
class/reference type, which is located in package java.lang.
Each wrapper class has a variety of methods including one to
return the type’s value, as shown in Table 3-6. These integer
and floating-point wrapper classes can return values of sev-
eral primitive types.
Wrapper Classes | 23
www.it-ebooks.info
Table 3-6. Wrapper classes
Primitive types Reference types Methods to get primitive values
boolean Boolean booleanValue( )
char Character charValue( )
byte Byte byteValue( )
short Short shortValue( )
int Integer intValue( )
long Long longValue( )
float Float floatValue( )
double Double doubleValue( )
Autoboxing
Autoboxing is the automatic conversion of primitive types to
their corresponding wrapper classes. In this example, the
prizefighter’s weight of 147 is automatically converted to its
corresponding wrapper class because collections store refer-
ences, not primitive values.
// Create hash map of weight groups
HashMap<String, Integer> weightGroups
= new HashMap<String, Integer> ( );
weightGroups.put("welterweight", 147);
weightGroups.put("middleweight", 160);
weightGroups.put("cruiserweight", 200);
www.it-ebooks.info
The following example shows an acceptable but not recom-
mended use of Autoboxing:
// Establish weight allowance
Integer weightAllowanceW = 5; //improper
TIP
For these examples, wrapper class variables end with a
capital W. This is not the convention.
Unboxing
Unboxing is the automatic conversion of the wrapper classes
to their corresponding primitive types. In this example, a ref-
erence type is retrieved from the hash map. It is automati-
cally unboxed so that it can fit into the primitive type.
// Get the stored weight limit
int weightLimitP = weightGroups.get(middleweight);
TIP
For these examples, primitive variables end with a capital P.
This is not the convention.
www.it-ebooks.info
CHAPTER 4 CHAPTER 4
Reference Types
26
www.it-ebooks.info
Table 4-2. Reference types compared to primitive types
Reference types Primitive types
Unlimited number of reference types, as Consists of boolean and numeric types:
they are user-defined. char, byte, short, int, long,
float, and double.
Memory location stores a reference to the Memory location stores actual data held
data. by the primitive type.
When a reference type is assigned to When a value of a primitive is assigned to
another reference type, both will point to another variable of the same type, a copy
the same object. is made.
When an object is passed into a method, When a primitive is passed into a method,
the called method can change the only a copy of the primitive is passed. The
contents of the object passed to it but not called method does not have access to the
the address of the object. original primitive value and therefore
cannot change it. The called method can
change the copied value.
Default Values
Instance and Local Variable Objects
Instance variable objects (objects declared at the class level)
have a default value of null. null references nothing.
Local variable objects (objects declared within a method) do
not have a default value, not even a value of null. Always ini-
tialize local objects because they are not given a default
value. Checking an uninitialized local variable object for a
value (including a value of null) will result in a compile-time
error.
Although object references with a value of null do not refer
to any object on the heap, objects set to null can be refer-
enced in code without receiving compile-time or runtime
errors.
Date dateOfParty = null;
// This is ok
if (dateOfParty == null) {
...
}
Default Values | 27
www.it-ebooks.info
Invoking a method on a reference variable that is null or
using the dot operator on the object will result in a java.
lang.NullPointerException.
String theme = null;
//This will result in an exception
//if theme is still set to null
if (theme.getLength( ) > MAX_LENGTH) {
...
}
Arrays
Arrays are always given a default value whether they are
declared as instance variables or local variables. Arrays that
are declared but not initialized are given a default value of
null.
In the code below, the gameList array is initialized but not
the individual values, meaning that the object references will
have a value of null. Objects have to be added to the array.
// This declared array named gameList
// is initialized to null by default
Game[] gameList;
www.it-ebooks.info
Widening Conversions
• Widening implicitly converts a subclass to a parent class
(superclass).
• Widening conversions do not throw runtime exceptions.
• No explicit cast is necessary.
String s = new String( );
Object o = s; // widening
Narrowing Conversions
• Narrowing converts a more general type into a more spe-
cific type.
• Narrowing is a conversion of a superclass to a subclass.
• An explicit cast is required. To cast an object to another
object, place the type of object you are casting to in paren-
theses immediately before the object you are casting.
Object a = new Object;
String b = (String)a; // Cast to String
• Illegitimate narrowing results in a ClassCastException.
• Narrowing may result in a loss of data/precision.
Objects cannot be converted to an unrelated type—that is, a
type other than one of its subclasses or superclasses. Doing
so will generate an inconvertible types error at compile
time. The following is an example of a conversion that will
result in a compile-time error due to inconvertible types:
Object c = "balloons";
int d = (int) c; // compile-time error
www.it-ebooks.info
Exploring the Variety of Random
Documents with Different Content
and perceptions more acute. The frog, whom she had left sitting
upon the timepiece, looked across at her. Rosalie gained assurance
from that glance.
She sat down without any remark, and took up the book she had
been reading, making some pretence of continuing her occupation as
before.
“I’ve heard a rumour,” said Miss Crokerly presently, “that the
Great High Priest is resigning.”
“Who is he?” asked Rosalie absently.
“The Great High Priest of the Serpent,” continued Miss Crokerly.
“I can scarcely credit it, though. He is barely seventy-two. And he can
have no reason for it either. It’s an office never vacated till death.
Dotage doesn’t count.”
“Maybe he is more conscientious than most,” said Rosalie, rousing
herself from her own line of thought to take an interest in the
conversation.
“I don’t know, I’m sure. There have been whispers of it for the last
three years. I think he has enemies.”
“I suppose all men in prominent positions have.”
“Yes; but there are enemies and enemies. Now my opinion of the
Great High Priest is that he has hidden enemies, or perhaps he
chances to be merely unfortunate.”
“What do you mean?” asked Rosalie, beginning to be interested in
the conversation.
“Well, it began with a scandal. A rumour got about that he had
admitted a woman to see the Serpent, and some said such conduct
was nothing short of blasphemous. But that was either hushed up or
contradicted. Contradicted, I think, and then hushed up.”
“Would it be such a terrible thing for a woman to see the Serpent?”
Miss Crokerly smiled.
“Well, there’s a great deal of superstition and ignorance mixed up
with our religion, as all simple and right-minded people can see. But
it grows in suitable soil, so it’s strong and holds well together.”
“And did it not please the people that a woman had seen the
Serpent?”
“Naturally not, after thousands of years of prejudice. Some of the
best—by that I mean the narrowest—women I know withdrew their
support (they were extremely wealthy) from the temple for some
months during the scandal. They said they felt the brightness of the
Serpent had been sullied.”
“Absurd!” said Rosalie; and the blood began to course a little
quicker through her veins from indignation.
“Well,” said Miss Crokerly slowly, “one can’t judge quickly. Of
course you know the Great High Priest is not allowed to have a wife.
She is separated from him the day he takes up office, and if he did
admit a woman from idle curiosity to see the Serpent—well, judged
from one point, it was very serious.”
“Maybe,” said Rosalie, whose tongue was itching to say much
more. “But do you think there was any truth in it?”
“Well, yes. A woman’s handkerchief with a red rose embroidered
in the corner was found upon the altar.”
“Never!” said Rosalie, with such a visible jump and accents so
sharp that Miss Crokerly looked up, and the frog’s eyes grew wide
with warning.
“It was so, indeed. My brother had it on good authority. One of the
Golden Priests went in that evening to offer the prayer at the New
Moon. He found it there. And then this hushed-up scandal followed.”
Again Rosalie was silent, why, she could scarcely tell. She
recognised the handkerchief, which in after events she had never
missed. It was her aunt’s birthday gift, with a little silk-embroidered
rose in the corner instead of a name.
“But why did the Golden Priest remark upon it?” asked Rosalie.
“That is what I say. And it is that which makes me think the Great
High Priest has enemies.”
“But such a thing as that, once died down, could not make him
resign.”
“Perhaps not. But I don’t think it ever really did die down. And last
year at the ‘Feast of White Souls,’ after the Fast of Black Ones, as he
was coming out from between the curtains to sprinkle white confetti
down the temple aisles, a most unfortunate thing occurred. The
crimson curtain suddenly tore from the rings and fell, and there
behind, to the view of a mixed assembly, shone out the Golden
Serpent. I was there myself, having gone to hear the music, for on
these occasions it is very fine, and was sitting with my brother quite
near to the choir stalls.”
“And what did you do?”
“Well, it was very strange, but we all instinctively did the same
thing. I took one real good look at the Serpent (and I don’t know any
woman there who didn’t, except those who screamed, and some who
fainted, for what, it would be hard to tell), and then, from a sense of
what was due to the male part of the congregation, we covered our
eyes with our handkerchiefs, and all turning our backs upon the God
we worshipped, were led solemnly out, with comparatively little
confusion. The service could not continue, and that event has made
him the most unpopular man on Lucifram.”
“Then,” said Rosalie, half laughing, half sarcastically, leaning back
in her chair, and looking at the fire, “I should say it would not be a
bad idea to introduce a ‘Feast of Handkerchiefs’ to take the place of
the unfortunate White Souls. A handkerchief betrayed one woman
and saved the rest. It should receive a place of honour in the temple.”
“What a pity he did not take it in that way,” said Miss Crokerly.
“But I’ve heard since that the occurrence has depressed him terribly.
And the last news is that he is resigning.”
“And which of the Golden Priests was it who spread the first
report?”
“His name is Alphonso. I know him slightly, but do not care for
him. I think him ambitious, and unscrupulous, and narrow-minded.
I cannot help but think myself he is the greatest enemy the High
Priest has, though there are some who uphold him as the strictest
and highest principled man within the Church.”
“I dislike him already,” said Rosalie impulsively.
The other laughed.
“Well, you will have an opportunity of meeting him to-morrow
night at the Sebberens’. He is unmarried, so you may be as charming
as you like to him, and no one’s heart will break. But for all that he’s
greatly run after by the women. They regard the Golden Priests and
the Great High Priest as demi-gods.”
The Golden Priests were those whose rank came next to that of the
Great High Priest, and when this latter died his place was always
filled from this exclusive body of great men, the wealthiest and most
powerful in the Church of Lucifram.
“Oh! that will make me dislike him all the more,” said Rosalie.
“The men who are run after by women, and the women who are run
after by men, are both equally detestable. I mean, of course, in
excess.”
“But that is fascination.”
“I prefer the fascination that is clever enough to captivate its own
sex.”
“Well, men admire him in an intellectual capacity.”
“A general favourite? Most insipid!”
“Really, Rosalie!” said Miss Crokerly, and she laughed.
“You cannot expect me to love him. A man should always be loyal
to his superior.”
“Well, of course, I am only giving you my own opinion. And you
must not repeat it on any account; because it is not generally
believed or certain that he might be prompted by motives of
ambition to make known the incident of the handkerchief.”
“I hope that if the High Priest does resign someone less self-
seeking takes his place.”
“Than Golden Priest Alphonso? But that is scarcely likely. He has
Mr. Barringcourt for his great friend, and—What is the matter,
Rosalie? Your cheeks are all aflame.”
“Oh! I—I—I’ve had springes of toothache all day, and the sudden
pain makes me flush. I’m all right now. What were you saying?”
“Alphonso is sure to succeed to the High Priestship sooner or later.
He has much influence on his side—the Prime Minister, and Lord
High All Superior for public and official friends, and Mr.
Barringcourt, whom I just mentioned, who has great influence in
outside circles, and more money apparently than even poor Geoffrey
Todbrook had. Now there’s a man for you to dislike cordially on the
grounds of general favouritism. The women idolise him, and men
will hear no wrong of him.”
“And what kind of a life does he lead? Is he a good man?” asked
Rosalie, leaning forward and looking across at her.
“I don’t know. My brother thinks greatly of him, and so do I. But
it’s hard to tell who’s good and who’s bad when you come to private
life. There are so many things for and against it.”
“Of course.”
“Still, I think as rich men go, who are young and unfettered by
anything, he must be fairly good. I don’t remember ever hearing
anything against him. And I know he has carried out all Geoffrey
Todbrook’s wishes with regard to charities to the letter.”
“Is he executor?”
“Yes.”
“Then it would be surprising if he fell short of his duties, would it
not?”
“Perhaps so. I expect he too will be at the Sebberens’ to-morrow
night But if you have any conversation with Mr. Barringcourt at all,
you cannot choose but like him.”
“Is his temper unfailingly pleasant, then?”
“No; it isn’t altogether that. I have known him very absent and off-
hand. But I suppose people occasionally find that rather pleasant in a
world of suavity and insincerity.”
“I don’t agree with you. I’d rather have people unfailingly suave. It
spares a great deal of friction.”
“What has upset you, Rosalie? You are most argumentative to-
night.”
“I expect you are spoiling me, and I’ve never been accustomed to
it. You should treat me with stern severity, and you would find me
improve wonderfully.”
“And you just preaching unfailing suavity.”
“Oh! I preach by the Creed of Contrary.”
But Rosalie’s argumentative mood sprang really from the irritation
that followed on the evening’s escapade.
In a cooler moment, and on reflection, she was not over and above
proud of the way in which she had fled so precipitately before the
enemy. And yet what was there to be done? To have stood still was to
have hazarded, so Rosalie thought, far more than she had any
intention of hazarding. She registered a mental vow never to go out
at night alone again, and wished, oh! wished most intensely, that
nothing had tempted her out that night. In her own room the frog
broke the silence by saying:
“You seem very upset to-night.”
“Yes. I—I met Mr. Barringcourt, and I ran away.”
“What made you run?”
“I was frightened of him.”
“What harm could he work you?”
“Oh! he might have persuaded me in a moment of weakness I
owed him a debt of gratitude.”
“And yet you have the kiss of freedom on your brow.”
“Yes; but like most abstract things, it sank before the concrete.”
“You’ll get over it by the morning. Sleep upon it.”
“I should have had you with me. You have far less fear than I. The
farther off the episodes of Marble House become the more I dread
them. They seemed all right, and yet they were all wrong.”
“Miss Crokerly said you would probably meet Mr. Barringcourt to-
morrow night.”
“Yes, I know. And it was only this morning I congratulated myself
he was not in her set, and that I should never be likely to meet him.”
“If you meet Mr. Barringcourt to-morrow night, you won’t run
away—will you?”
“No; because it will be light, and there will be people about, and I
shall have you. No, I won’t run away in any case. But you will come
with me?”
“Of course! I should have very much enjoyed the fresh air to-night;
but you did not invite me.”
“I’m sorry. But I’ve paid the penalty of my negligence; from
henceforth you must never leave me.”
“What dress do you intend to wear to-morrow night?”
“The one I have worn all along.”
“It’s as shabby as if you’d been digging in it. But the morning may
bring you another.”
“I hope it may not be very heavy, in case I should have to depend
on my heels again.”
CHAPTER XXIV
AT THE SEBBERENS’
That night when she and the frog were alone together, Rosalie
began the conversation by saying:
“What do you think of Mr. Barringcourt?”
“I like him,” said the frog, quite shortly.
“What has prepossessed you?”
“Nothing particularly. But I like him. I’m sorry you were so rude to
him.”
Rosalie flushed. The tone was almost grave enough for a rebuke.
“I? Rude? Oh, Brightcoat, how can you say so? I always try to be
polite to him, and it always ends in failure. It is he who is rude to
me.”
“No,” said the frog; “you take no pains to act or to speak sensibly.
And to say you detest anyone is absurd, ridiculous, to say nothing of
bad manners.”
“You’ve never lived in Marble House, so you can afford to talk.
Talk about vivisection! It was Mr. Barringcourt who openly deplored
to me there was no such thing in our country. What do you think of
that?”
“There are worse things than vivisection,” replied the frog. “If it
were not for that I should never have been here, or alive now.”
“But—” said Rosalie, staring at it.
“Why don’t you cultivate a charming manner, Rosalie?”
“I expect I’m not made that way. Are my manners so uncouth?”
and her expression was doleful.
“No; but I don’t see how you’re to get your six horses, chariot, and
all the rest, unless you try to be more charming.”
“Well, Mr. Barringcourt will never help me that way. You should
have seen the look he gave me last night, and then to-night, as if he’d
never seen me before. Such folk give me quite a creepy feeling.
Besides, talking about horses, his are black. Can’t you see he is the
exact opposite of what I want? He would do all he could to hinder
me. If it were not that once I saw him looking very tired I should
detest him too. Oh, how I hate Lucifram! Somehow or other, I never
feel at home here,” and she sighed.
“And you’ve got about all it can give you.”
“Then I’m like all the rest—ungrateful.”
“Rosalie, has it ever struck you you are very pretty?”
“Yes; every now and again it has. But what of that? All the women
we saw to-night were pretty. It’s the commonest of all things. If I’d a
big hook nose now I might appear imposing. But no; even that is
common enough to-day.”
After a pause the frog said: “I heard someone say to-night you
were the prettiest woman there.”
“Please, don’t! I’d so much rather you left my personal appearance
alone.”
But the frog continued:
“It’s as well for people to think about these things at times. I know
many a lovely woman who has been ruined by thinking too much of
her beauty in one way, and too little in another. They know they are
beautiful, and that knowledge is all-sufficient to them; their food and
recreation, and all in all.”
“But I’m not one of those.”
“No. I think you might put yours to much more use than you do.”
“You speak in puzzles.”
“You are not so dull but that with a little consideration you will
understand me.”
So Rosalie went to bed much sat on by the frog, but maybe
profiting, as most of us do, from a little compression and criticism.
Next day everything was sloppy, wet, and dismal. Rain began to
fall in the afternoon, and going out, no matter of pleasure on such a
day, was not indulged in.
Tea had just been brought in, and Rosalie and Miss Crokerly were
preparing to enjoy it alone, when visitors were announced. They
were Mr. Barringcourt and the Golden Priest Alphonso.
“I came to return the umbrella, Miss Crokerly, and met the Golden
Priest on my way.”
“Then you will have tea,” said she. “On a wet day you are doubly
welcome. No one else has ventured out.”
“We are fortunate. Miss Paleaf, allow me to introduce my friend,
Golden Priest Alphonso, to you.”
And Rosalie, having a severe and cold critic perched upon her
shoulder, rose very gracefully and bowed.
“It must have been very important business that brought you out
on such a day,” said she to him, as they sat down, with charming
sympathy.
“Well, I was out begging, and a beggar cannot choose his weather.
I was going in search of Mr. Barringcourt for a subscription for a new
decorative curtain for the temple.”
“In place of the old red one?”
“Exactly. It was old and shabby, despite its richness, and we think
it must be rotten. There is every indication that it may give way
again, and so we are making all speed with the new one.”
“Then you are not superstitious enough to think it gave way before
from anything but natural causes?”
He looked at her sharply and narrowly.
“Oh, no,” he answered. “One can find a natural cause for
everything. Therein lies the greater miracle.”
“But how?” said Rosalie, subduing her tongue in deferential
attention to the pillar of the Church.
He smiled, as became one of exalted intellect.
“Well, there is nothing like order—cause and effect—to work a
lasting miracle. A startling thing has a short life. The rottenness of
the curtain was the symbol of something still more rotten. Nothing
takes place in a day.”
Rosalie’s eyes opened innocently, though they were very far from
innocent. There is no doubt the frog must have been to blame for it.
“What is still more rotten? But perhaps my questions bore you. I
am so inquisitive.”
Again he smiled.
“You could never be that. But what is still more rotten is the
system that lets old men continue in office after they have proved
themselves unfit for it.”
Rosalie’s eyes betrayed a charming depth of horror at this cold-
blooded statement.
“But, sir,” said she, “who is to be the judge of their incapacity?
And, again, it seems so cruel, and—and—doesn’t it make a terrible lot
of enemies for you, saying things like that?”
The Golden Priest laughed. The last remark evidently was to some
point.
“In the cause of common sense one has no objection to making
enemies. And I cannot for the life of me see why the highest position
in the land should never be filled by a man till he’s nearly in his
dotage.”
“Oh! it’s more restful. Besides, a great and a good man should
retain his intellect to his death, however old and feeble he may be.”
“Granted! But feebleness is no qualification for an important post.
And greatness and goodness should discern its own capacity.”
“Is it true, then, that the Great High Priest is resigning?”
“Yes; in a few months.”
“He has discernment, then?”
“I think his action is a little too late for that. His plea is ill-health.
None of us have heard anything further—not those nearest to him in
office.”
“And then there will come the general election for his successor?”
(For in Lucifram they chose their highest priests that way. The
clergy vote for them.)
“Yes; in a few weeks from now.”
“It will be a very distracting time?”
“Scarcely more so than the last year has been.”
And so the silent plot of years had worked to a fulfilment, the veil
or mask at length being thrown aside. To-day was spoken openly
what a month ago had been whispered and kept down.
Here the conversation was interrupted by Miss Crokerly.
“Mr. Barringcourt tells me he saw the secretary again this
morning, and arranged for all the things you suggested, Rosalie.”
“Yes. He has never doubted my judgment before, but I think he
must have detected a foreign influence, he looked so dubious.”
Rosalie laughed.
“Are they to have force-meat and sausages with the turkey, do you
know?” she asked.
“It never occurred to me to ask.”
“And you an executor of a will! And never to inquire about the
gravy and bread-sauce. It’s plain you don’t attach enough importance
to a Christmas dinner. But if I were you, Mr. Barringcourt, I’d
countermand all orders, and give them 3s. 6d. each, and a free day to
enjoy themselves anywhere and anyhow, with a night each end, to
make a complete sandwich and a delightful holiday.”
“You imagine them to be prisoners. On the contrary, those who
have friends or relations who care to receive them may have leave
from the Home once every month. And for the inmates, you must
remember it is no prison that they live in, and they are very happy.”
“I suppose so,” said Rosalie. “But I always dread those public
institutions for defects.”
“You are prejudiced,” put in the Golden Priest. “They are the
greatest blessings in existence. I always regard them as branches of
the temple.”
“So do I,” said Mr. Barringcourt; but the tone was questionable.
“I have the greatest longing to go through Todbrook’s Home,” said
Miss Crokerly. “One hears so much about it. I should like to see the
inmates at work.”
Rosalie shivered.
“Oh! would you, Miss Crokerly? I can imagine nothing more
galling to them than to be watched by strangers.”
“But is it such an infliction to them?” asked that lady, turning to
Mr. Barringcourt.
“I don’t know, I’m sure,” said he. “I hardly think so. I think myself
it would be better if they had more visitors from the outside world.
Lady Flamington is the only lady I have ever taken over the
premises.”
“I had just left there,” said the Golden Priest, “before I met you to-
day. I hear she caught a severe chill last night, and is confined to her
room.”
“Indeed,” said Miss Crokerly; and Mr. Barringcourt and Rosalie
looked at each other, from no apparent motive.
When tea was over the two gentlemen rose to go.
“I think,” said Mr. Barringcourt, in a lower voice, to Rosalie, as the
others were speaking of a special fern which both were rearing—“I
think it would not be a bad plan for you to go over the Home with
Miss Crokerly. The matron will willingly take you over, and you’ll
find there are worse things in the world than being deaf and dumb,
or even blind.”
Then somehow or other they looked at each other, the first time
really since the Saturday night. How long ago it seemed now! And
each was very curious about the other evidently, for Rosalie’s eyes
searched his, and his eyes hers, but what conclusion either came to it
would be hard to say.
And then she shook hands with the Golden Priest, and the door
closed.
“Do you think,” said Miss Crokerly, “that Mr. Barringcourt told the
Golden Priest your opinion of him, and brought him here to-day in
consequence?”
“No, I don’t think so,” she replied thoughtfully. “I think Mr.
Barringcourt must have recognised the Golden Priest has no sense of
humour, and would resent instead of forgiving opinions.”
“Your tone proves appearances are deceptive. I thought by your
manner you had changed your estimate of him.”
Rosalie half shuddered, and stretched her hands to the blaze.
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookgate.com