(eBook PDF) Introduction to Java Programming and Data Structures, Comprehensive Version, 11th Global Edition download
(eBook PDF) Introduction to Java Programming and Data Structures, Comprehensive Version, 11th Global Edition download
https://ebooksecure.com/product/ebook-pdf-introduction-to-java-
programming-and-data-structures-comprehensive-version-11th-
global-edition/
http://ebooksecure.com/product/ebook-pdf-introduction-to-java-
programming-and-data-structures-comprehensive-version-11/
http://ebooksecure.com/product/ebook-pdf-introduction-to-java-
programming-brief-version-global-edition-11th-edition/
https://ebooksecure.com/download/introduction-to-java-
programming-comprehensive-version-ebook-pdf/
http://ebooksecure.com/product/ebook-pdf-java-foundations-
introduction-to-program-design-and-data-structures-5th-edition/
(eBook PDF) Data Structures and Abstractions with Java
4th Global Edition
http://ebooksecure.com/product/ebook-pdf-data-structures-and-
abstractions-with-java-4th-global-edition/
http://ebooksecure.com/product/ebook-pdf-data-structures-and-
abstractions-with-java-4th-edition/
http://ebooksecure.com/product/data-structures-and-abstractions-
with-java-5th-edition-ebook-pdf/
http://ebooksecure.com/product/ebook-pdf-data-structures-and-
other-objects-using-java-4th-edition/
http://ebooksecure.com/product/ebook-pdf-data-structures-and-
problem-solving-using-java-4th-edition/
6 Preface
Part I: Fundamentals of Part II: Object-Oriented Part III: GUI Programming Part IV: Data Structures and Part V: Advanced Java
Programming Programming Algorithms Ch 16 Programming
Chapter 1 Introduction to Chapter 9 Objects and Classes Chapter 14 JavaFX Basics Ch 7 Chapter 18 Recursion Chapter 32 Multithreading and
Computers, Programs, and Parallel Programming
Java
Chapter 10 Thinking in Objects Chapter 15 Event-Driven Ch 13 Chapter 19 Generics
Programming and Chapter 33 Networking
Chapter 2 Elementary Animations
Chapter 11 Inheritance and Chapter 20 Lists, Stacks, Queues,
Programming
Polymorphism and Priority Queues Chapter 34 Java Database
Chapter 16 JavaFX Controls Programming
Chapter 3 Selections and Multimedia
Chapter 12 Exception Chapter 21 Sets and Maps
Handling and Text I/O Chapter 35 Advanced Database
Chapter 4 Mathematical Chapter 31 Advanced JavaFX Programming
Chapter 22 Developping
Functions, Characters, Chapter 13 Abstract Classes and FXML Efficient Algorithms
and Strings and Interfaces Chapter 36 Internationalization
Chapter 23 Sorting
Chapter 5 Loops Chapter 17 Binary I/O Chapter 37 Servlets
Chapter 24 Implementing Lists,
Chapter 6 Methods Stacks, Queues, and Priority Chapter 38 JavaServer Pages
Queues
Part III: GUI Programming (Chapters 14–16 and Bonus Chapter 31)
JavaFX is a new framework for developing Java GUI programs. It is not only useful for
developing GUI programs, but also an excellent pedagogical tool for learning object-oriented
programming. This part introduces Java GUI programming using JavaFX in Chapters 14–16.
Major topics include GUI basics (Chapter 14), container panes (Chapter 14), drawing shapes
(Chapter 14), event-driven programming (Chapter 15), animations (Chapter 15), and GUI
controls (Chapter 16), and playing audio and video (Chapter 16). You will learn the a rchitecture
of JavaFX GUI programming and use the controls, shapes, panes, image, and video to develop
useful applications. Chapter 31 covers advanced features in JavaFX.
Part IV: Data Structures and Algorithms (Chapters 18–30 and Bonus Chapters 42–43)
This part covers the main subjects in a typical data structures and algorithms course. Chapter 18
introduces recursion to write methods for solving inherently recursive problems. Chapter 19 presents
how generics can improve software reliability. Chapters 20 and 21 introduce the Java Collection
Framework, which defines a set of useful API for data structures. Chapter 22 discusses measur-
ing algorithm efficiency in order to choose an appropriate algorithm for applications. Chapter 23
describes classic sorting algorithms. You will learn how to implement several classic data struc-
tures lists, queues, and priority queues in Chapter 24. Chapters 25 and 26 introduce binary search
trees and AVL trees. Chapter 27 presents hashing and implementing maps and sets using hashing.
Chapters 28 and 29 introduce graph applications. Chapter 30 introduces aggregate operations for
collection streams. The 2-4 trees, B-trees, and red-black trees are covered in Bonus Chapters 42–43.
Appendixes
This part of the book covers a mixed bag of topics. Appendix A lists Java keywords. Appendix B
gives tables of ASCII characters and their associated codes in decimal and in hex. Appen-
dix C shows the operator precedence. Appendix D summarizes Java modifiers and their usage.
Appendix E discusses special floating-point values. Appendix F introduces number systems and
conversions among binary, decimal, and hex numbers. Finally, Appendix G introduces bitwise
operations. Appendix H introduces regular expressions. Appendix I covers enumerated types.
Student Resources
The Companion Website (www.pearsonglobaleditions.com/Liang) contains the following
resources:
■■ Answers to CheckPoint questions
■■ Solutions to majority of even-numbered programming exercises
■■ Source code for the examples in the book
■■ Interactive quiz (organized by sections for each chapter)
■■ Supplements
■■ Debugging tips
■■ Video notes
■■ Algorithm animations
Supplements
The text covers the essential subjects. The supplements extend the text to introduce additional
topics that might be of interest to readers. The supplements are available from the Companion
Website.
Preface 9
Instructor Resources
The Companion Website, accessible from www.pearsonglobaleditions.com/Liang, contains the
following resources:
■■ Microsoft PowerPoint slides with interactive buttons to view full-color, syntax-highlighted
source code and to run programs without leaving the slides.
■■ Solutions to a majority of odd-numbered programming exercises.
■■ More than 200 additional programming exercises and 300 quizzes organized by chapters.
These exercises and quizzes are available only to the instructors. Solutions to these
exercises and quizzes are provided.
■■ Web-based quiz generator. (Instructors can choose chapters to generate quizzes from a
large database of more than two thousand questions.)
■■ Sample exams. Most exams have four parts:
■■ Multiple-choice questions or short-answer questions
■■ Correct programming errors
■■ Trace programs
■■ Write programs
■■ Sample exams with ABET course assessment.
■■ Projects. In general, each project gives a description and asks students to analyze, design,
and implement the project.
Some readers have requested the materials from the Instructor Resource Center. Please
understand that these are for instructors only. Such requests will not be answered.
Video Notes
We are excited about the new Video Notes feature that is found in this new edition. These VideoNote
videos provide additional help by presenting examples of key topics and showing how
to solve problems completely from design through coding. Video Notes are available from
www.pearsonglobaleditions.com/Liang.
10 Preface
Algorithm Animations
Animation We have provided numerous animations for algorithms. These are valuable pedagogical tools
to demonstrate how algorithms work. Algorithm animations can be accessed from the Com-
panion Website.
Acknowledgments
I would like to thank Armstrong State University for enabling me to teach what I write and for
supporting me in writing what I teach. Teaching is the source of inspiration for continuing to
improve the book. I am grateful to the instructors and students who have offered comments,
suggestions, corrections, and praise. My special thanks go to Stefan Andrei of Lamar Univer-
sity and William Bahn of University of Colorado Colorado Springs for their help to improve
the data structures part of this book.
This book has been greatly enhanced thanks to outstanding reviews for this and previous edi-
tions. The reviewers are: Elizabeth Adams (James Madison University), Syed Ahmed (North
Georgia College and State University), Omar Aldawud (Illinois Institute of Technology), Ste-
fan Andrei (Lamar University), Yang Ang (University of Wollongong, Australia), Kevin Bierre
(Rochester Institute of Technology), Aaron Braskin (Mira Costa High School), David Champion
(DeVry Institute), James Chegwidden (Tarrant County College), Anup Dargar (University of North
Dakota), Daryl Detrick (Warren Hills Regional High School), Charles Dierbach (Towson Univer-
sity), Frank Ducrest (University of Louisiana at Lafayette), Erica Eddy (University of Wisconsin at
Parkside), Summer Ehresman (Center Grove High School), Deena Engel (New York University),
Henry A. Etlinger (Rochester Institute of Technology), James Ten Eyck (Marist College), Myers
Foreman (Lamar University), Olac Fuentes (University of Texas at El Paso), Edward F. Gehringer
(North Carolina State University), Harold Grossman (Clemson University), Barbara Guillot (Loui-
siana State University), Stuart Hansen (University of Wisconsin, Parkside), Dan Harvey (Southern
Oregon University), Ron Hofman (Red River College, Canada), Stephen Hughes (Roanoke Col-
lege), Vladan Jovanovic (Georgia Southern University), Deborah Kabura Kariuki (Stony Point
High School), Edwin Kay (Lehigh University), Larry King (University of Texas at Dallas), Nana
Kofi (Langara College, Canada), George Koutsogiannakis (Illinois Institute of Technology), Roger
Kraft (Purdue University at Calumet), Norman Krumpe (Miami University), Hong Lin (DeVry
Institute), Dan Lipsa (Armstrong State University), James Madison (Rensselaer Polytechnic Insti-
tute), Frank Malinowski (Darton College), Tim Margush (University of Akron), Debbie Masada
(Sun Microsystems), Blayne Mayfield (Oklahoma State University), John McGrath (J.P. McGrath
Consulting), Hugh McGuire (Grand Valley State), Shyamal Mitra (University of Texas at Austin),
Michel Mitri (James Madison University), Kenrick Mock (University of Alaska Anchorage), Frank
Murgolo (California State University, Long Beach), Jun Ni (University of Iowa), Benjamin N ystuen
(University of Colorado at Colorado Springs), Maureen Opkins (CA State University, Long Beach),
Gavin Osborne (University of Saskatchewan), Kevin Parker (Idaho State University), Dale Par-
son (Kutztown University), Mark Pendergast (Florida Gulf Coast University), Richard Povinelli
(Marquette University), Roger Priebe (University of Texas at Austin), Mary Ann Pumphrey (De
Anza Junior College), Pat Roth (Southern Polytechnic State University), Amr Sabry (Indiana Uni-
versity), Ben Setzer (Kennesaw State University), Carolyn Schauble (Colorado State University),
David Scuse (University of Manitoba), Ashraf Shirani (San Jose State University), Daniel Spiegel
(Kutztown University), Joslyn A. Smith (Florida Atlantic University), Lixin Tao (Pace University),
Ronald F. Taylor (Wright State University), Russ Tront (Simon Fraser University), Deborah Trytten
(University of Oklahoma), Michael Verdicchio (Citadel), Kent Vidrine (George Washington Uni-
versity), and Bahram Zartoshty (California State University at Northridge).
It is a great pleasure, honor, and privilege to work with Pearson. I would like to thank Tracy
Johnson and her colleagues Marcia Horton, Demetrius Hall, Yvonne Vannatta, Kristy Alaura,
Carole Snyder, Scott Disanno, Bob Engelhardt, Shylaja Gattupalli, and their colleagues for
organizing, producing, and promoting this project.
As always, I am indebted to my wife, Samantha, for her love, support, and encouragement.
Preface 11
Chapter 3 Selections 97
3.1 Introduction 98
3.2 boolean Data Type 98
3.3 if Statements 100
3.4 Two-Way if-else Statements 102
3.5 Nested if and Multi-Way if-else Statements 103
3.6 Common Errors and Pitfalls 105
3.7 Generating Random Numbers 109
3.8 Case Study: Computing Body Mass Index 111
3.9 Case Study: Computing Taxes 112
3.10 Logical Operators 115
3.11 Case Study: Determining Leap Year 119
3.12 Case Study: Lottery 120
3.13 switch Statements 122
12
Contents 13
3.14 Conditional Operators 125
3.15 Operator Precedence and Associativity 126
3.16 Debugging 128
Chapter 20 L
ists, Stacks, Queues, and
Priority Queues 797
20.1 Introduction 798
20.2 Collections 798
20.3 Iterators 802
20.4 Using the forEach Method 803
20.5 Lists 804
20.6 The Comparator Interface 809
20.7 Static Methods for Lists and Collections 813
20.8 Case Study: Bouncing Balls 816
20.9 Vector and Stack Classes 820
20.10 Queues and Priority Queues 821
20.11 Case Study: Evaluating Expressions 825
Chapter 29 W
eighted Graphs and
Applications 1107
29.1 Introduction 1108
29.2 Representing Weighted Graphs 1109
29.3 The WeightedGraph Class 1111
29.4 Minimum Spanning Trees 1119
29.5 Finding Shortest Paths 1125
29.6 Case Study: The Weighted Nine Tails Problem 1134
Chapter 30
Aggregate Operations
for Collection Streams 1145
30.1 Introduction 1146
30.2 Stream Pipelines 1146
30.3 IntStream, LongStream, and DoubleStream 1152
30.4 Parallel Streams 1155
30.5 Stream Reduction Using the reduce Method 1157
30.6 Stream Reduction Using the collect Method 1160
30.7 Grouping Elements Using the groupingby Collector 1163
30.8 Case Studies 1166
Appendixes 1177
Appendix A Java Keywords 1179
Appendix B The ASCII Character Set 1180
Appendix C Operator Precedence Chart 1182
Appendix D Java Modifiers 1184
Appendix E Special Floating-Point Values 1186
Appendix F Number Systems 1187
Appendix G Bitwise Operations 1191
Appendix H Regular Expressions 1192
Appendix I Enumerated Types 1197
Animations
1
Introduction
to Computers,
Programs, and Java™
Objectives
■■ To understand computer basics, programs, and operating systems
(§§1.2–1.4).
■■ To describe the relationship between Java and the World Wide Web
(§1.5).
■■ To understand the meaning of Java language specification, API, JDK™,
JRE™, and IDE (§1.6).
■■ To write a simple Java program (§1.7).
■■ To display output on the console (§1.7).
■■ To explain the basic syntax of a Java program (§1.7).
■■ To create, compile, and run Java programs (§1.8).
■■ To use sound Java programming style and document programs properly
(§1.9).
■■ To explain the differences between syntax errors, runtime errors, and
logic errors (§1.10).
■■ To develop Java programs using NetBeans™ (§1.11).
■■ To develop Java programs using Eclipse™ (§1.12).
Another Random Scribd Document
with Unrelated Content
"No."
Kwan Luey looked disappointed.
"Maybe you likee see Big Sam, eh?" he said with an insinuating
air.
"Oh, Big Sam wants to see me, does he?"
"You likee see Big Sam," repeated Kwan Luey with the air of one
stating a recognized fact. "Maybe him show you how pick plenty
good ticket, eh?"
"Does he want to see me to-night?"
"I no know--him no say. Too many p'lice--too many hoodlum--
maybe you no likee," said Kwan Luey, with a judicial view of the
obstacles to an interview with the King of Chinatown.
I decided that I would take the chances, though it was
approaching midnight, when my attention was attracted by the voice
of Parks, and I turned to see him at the desk. My heart sank with
the thought of Mercy's disappointment, when it was buoyed up once
more by the discovery that he was not in custody. Instead of
standing there a prisoner, he was piling little stacks of gold before
the desk sergeant, and I divined that he was producing bail for those
followers who had been so unfortunate as to fall into the hands of
the police. As he shoved the last of the stacks across the desk and
took the receipt that was offered him, he caught sight of me.
"What brings you here?" he cried in surprise.
"I have come, like yourself, on an errand of mercy. But I am the
one who has the greater reason to be surprised." I marveled at his
rashness in daring to enter the prison, and marveled still more that
he was not put under arrest where he stood. Then I reflected that it
was most unlikely that the policemen on guard at the prison had
seen him at the Nob Hill meeting or at the rescue of Merwin; and if
his description was on the books it was not definite enough to serve
for identification.
"By heavens! They call this law!" he cried, waving his hand
around at the prison. "Do you know, sir, that they have set
Baumgartner's bail at five hundred dollars, and threaten to rearrest
him as he sets foot out of prison, if I secure his release with that
sum!"
"Then I think you had better save your five hundred," I replied.
"You can take it coolly, Hampden, but I can't. It makes my blood
boil. If I had my way, I'd be here taking these men out with ax and
sledge, instead of with gold. I'd have done it anyhow if they had had
the courage to arrest Kearney. They didn't dare!" And he looked
threateningly around the prison, and then counted the members of
his band for whom the authorities had accepted bail. "Pass out," he
said to them, and as he brought up the rear of his party, I followed
him. They were of the typical hoodlum class, their insolence curbed
for the moment by the shadow of the prison, and they slouched with
resentful fear from the watchful eyes of the police. One figure
among them stirred a dormant memory, and then, as the band
scattered in the street, I recalled to mind the spy whose gift of an
overcoat had opened the door of the fates. He was gone before I
could speak, and I turned to Parks.
"How did you escape arrest?" I asked.
"Escape!" cried Parks. "I courted arrest, but the coward hounds
of aristocracy had not the courage to lay hands on any of the
leaders. They know as well as I that the wrath of an outraged
people would not leave one stone of the jail upon another, if they
ventured to seize Kearney, or even so humble a person as I."
"To tell you the truth, I came down here expecting to find you in
custody, and to see what I could do toward getting you out. No, you
needn't thank me for it. Give your thanks to a young lady who is
paying you the compliment of more worry than you are worth. I
came to relieve her anxiety--not yours."
Parks halted as we reached the corner of Merchant and Kearny
Streets, and I saw the tense and angry lines soften on his face.
"Hampden, I won't pretend to misunderstand you. You're right.
I'm not worth her worry--nor is any man. I am grateful; but I tell
you, as I tell her, that our private interests, hopes, affections, are
nothing compared with the great cause of the people."
"Well, for her sake, I hope you'll keep out of jail."
Parks took off his hat, and shook his mane with an angry nod.
"A few more days," he cried, "and this cowardly set of time-
servers will be begging my protection instead of threatening my
liberty."
"Are you ready to strike a blow?" I asked with sudden interest.
"Never mind," he said darkly. "We await only the word from our
brethren in the East. You can see the crisis approaching there. The
railroad strikes have spread from the Atlantic to the Missouri. The
frightened bloodsuckers of society are calling out the troops in the
desperate hope of prolonging their hold on the labor and productive
resources of the country. When the hour strikes--"
Parks had gradually raised his voice in oratorical fervor, despite
the nearness of the police headquarters, but at this moment he was
interrupted by a tall, strong-faced man, who seized him by the
shoulder and whispered something in his ear.
"Hampden," said Parks, "I am called. Will you be kind enough to
send word that I am safe? I shall see your friend to-morrow." And
with a nod he plunged into the crowd that blocked Kearny Street
and disappeared.
At the drug store on the corner I scribbled a note that should
set Miss Fillmore's mind at rest, and with some difficulty found a
messenger who would deliver it. Then with misgivings I shouldered
my way through the crowd, crossed the Plaza, and entered
Chinatown.
The echoes of the Nob Hill meeting reverberated here as well as
about the Old City Hall, but with a far different note. In place of the
illuminated streets, the gay lanterns and the open doors of invitation
of other days, there were barred entrances everywhere; the lights,
where seen at all, flickered behind closed shutters, and the darkened
buildings were surrounded with an atmosphere of sullen
watchfulness. There was evident fear that the meeting on the hill
was but the prelude to an attack on Chinatown, and Chinatown was
prepared.
The entrance to Big Sam'e house was closed and barred, like
the other doors of Waverly Place, but lights shone through the
chinks in the shutters, and there were sounds of men stirring
behind; so without hesitation I gave a resounding rap on the panel.
The noises within ceased suddenly, but there was no response to my
summons. I rapped again, and then a third time, before a singsong
voice cried through the door:
"Wha' fo'? What you wan'?"
"I want to see Big Sam," I explained.
"No catch-em Big Sam," returned the voice harshly.
"You tell Big Sam Mr. Hampden here to see him," I cried. "He
send tell me come. You sabby tell him now--right away."
There was a sudden outbreak of Chinese voices in argument
and protest, and then silence followed for so long that I was about
to rap again, when the same voice called through the door:
"How many you come?"
"One man."
There were sounds of a barricade removed, and the door
opened cautiously for a few inches while its guardian reconnoitered.
Reassured by my solitary figure, he stood aside for me to pass.
At the last moment my lagging judgment suggested the folly of
putting myself as a hostage in the hands of the yellow men in such a
time of storm. But it was too late to retreat with honor, and I slipped
through the opening with all the boldness and self-possession I
could assume, and saw the door bolted and barricaded against other
intrusion. I looked narrowly about me.
Within the store that formed the entrance to Big Sam's
establishment were twenty or thirty Chinese, and in the smoky light
of the lamps I could distinguish the expression of suspicion and
hatred that had escaped from behind the "no-sabby" mask of the
coolie. The passions of the meeting on the hill had stirred an
answering passion in the breasts of the yellow man, and I saw that
in this place, at least, he was armed and ready for battle. The band
pretended to take no notice of me, but the running fire of
conversation that followed my entrance told me by its unmistakable
accents that my coming had roused the instincts of combat, as the
sight of the prey rouses the hunting instincts of the tiger.
Without a word a Chinaman beckoned me to follow him, and
with some trepidation I stumbled up the stair in his footsteps. He
stood aside at the entrance to Big Sam's room of state, motioned me
to enter, and as I stepped in, he closed the door behind me.
For a moment I was disturbed to find that I was the only person
in the room, and looked about with curiosity to know whether I was
spied upon from some hidden post of observation. After my
experience on the previous visit, I could not doubt that more than
one hidden entrance led to the room, and I suspected that more
than one pair of eyes watched me from hidden peep-holes. The dark
carved wood of the furniture and walls, and the figures in the
intricately embroidered hangings glowered at me with something of
the repressed hostility of the guards down-stairs. The life and
turmoil of the city from which I had just come seemed already at a
vast distance from that oriental hall, and I could not but reflect how
easy it would be to make certain that I never returned to the
modern San Francisco that seemed now to lie so far away.
With a discretion that would recommend me in the eyes of any
watcher, I took a chair far enough from the desk to avoid the
suspicion of a wish to pry into Big Sam's papers, and surveyed the
apartment as I impatiently awaited the coming of its owner.
Suddenly the voice of Big Sam sounded behind me.
"I am always glad to welcome Mr. Hampden--even when he is
the bearer of bad news."
I had heard no sound of his entry, and turned with a start at his
voice. Then I exclaimed in surprise. Instead of Big Sam, in his
Chinese costume, I saw an American gentleman regarding me with
an impassive face. His light plaid suit was of fashionable cut, and no
detail of costume was wanting. But for the voice, I should have
supposed, at first glance, that another visitor had followed me into
Big Sam's reception-room, and it was only a closer look that
revealed the features of Big Sam himself. A touch of art had
lightened the color of his skin, and only the eyes and cheek-bones
suggested his Asiatic origin.
"I hope it is no bad news that brings me," I said, as Big Sam
advanced to shake my hand. "I think I bring none myself."
Big Sam seated himself behind his desk, looking incongruously
out of place--a modern American as master of an oriental domain.
"In this time of broils and alarms, one's first thought must be of
sudden evil," he said gravely. "You may guess, by my disguise, I
have been observing how your people comport themselves when
they assemble to consider the interests of their race. I have been
much edified."
In his American dress, and with his perfect command of English,
I had no doubt that he might have brushed shoulders with Kearney
himself without rousing suspicion of his nationality.
"It has been an inspiring evening," I replied with a gravity equal
to his own. "I see you have prepared for trouble."
"I am not insensible to the advantages or rights of self-
defense," he said dryly. "But I trust that you have found nothing
incorrect in our attitude--if I may borrow a phrase from your
diplomats. I would be unwilling to take any course objectionable to
the country that is my host--possibly a somewhat unwilling host, if I
may judge by the words I have heard to-night." Big Sam looked at
me with the inscrutable irony of the Orient.
"I can see no ground for complaint," I replied. "I have come to
learn, not to reprove or to warn."
"I am, as ever, at your service."
"I was happy enough to meet our estimable friend Kwan Luey--
under somewhat difficult and depressing circumstances, I may add--
and he was so insistent in his assumption that I wished to see you
that I thought it wise to test his theory before I went to sleep."
The shadow of a smile swept across Big Sam's face.
"Kwan Luey has his moments of divination," he said, and then
fell silent.
"May I inquire what particularly I wished to see you about?" I
asked at last.
Big Sam's eyes studied me keenly.
"I warned you--not so long ago, Mr. Hampden--that strange
events were preparing in your city. May I ask what is now your
opinion on them? I am interested to hear."
"I must congratulate you on the accuracy of your information,
though I am still at a loss to surmise why you should have been
selected for the confidence. And as for the disorders, they are but a
temporary effervescence, which will die away, or be suppressed. But
there is one thing permanent about them. They are a crude
expression of the resolve of our race to hold the continent for itself."
"Crude indeed!" said Big Sam with energy. "And will destroy
itself by its own violence. I have here a paper showing the sentiment
of your people in the Eastern States. It makes a protest against the
policy that would exclude us."
"I shan't begrudge you the pleasure you can get out of that sort
of comment. But I can assure you that race feeling will prevail."
"Over private interest? I believe not. And the private interest of
your governing classes is with the free admission of my people. But
enough of that. Where is your charge--and mine--Moon Ying?"
He threw this question at me as though he hoped to surprise
some admission.
"She is still with Miss Kendrick."
"What arrangements have you made to protect her?"
"Protect her? From what? Are the highbinders so desperate as
to think of attacking Mr. Kendrick's house? I trust you will warn them
that this would be something far more serious than all Kearney's
oratory. It would mean the destruction of Chinatown."
"I understand you," said Big Sam suavely. "I have no doubt that
an attack by the tongs on Mr. Kendrick's house would bring a terrible
reprisal. Fortunately there are few among my people who do not
understand that quite as well as you."
"Nevertheless there is something you fear," I said, as Big Sam
hesitated.
"You must understand, Mr. Hampden, that this girl is a very
desirable piece of property. There is her money value, which is
considerable. And there is the further consideration that the
possession of her would give a tong a certain power and distinction.
The contest has come to be a point of honor--or perhaps you would
say dishonor. At all events the tongs have not ceased to plan to
recover her, and I have information that the Hop Sing Tong has
devised a plan to seize her by force. It would, of course, be suicide
for them to carry out the plan themselves. But what they can not do
themselves can be done by white men. Your race is not more
scrupulous than mine, Mr. Hampden. I have reason to believe that
the Hop Sing Tong has found a gang of white men who are ready,
for a money consideration, to break into Mr. Kendrick's house and
carry off the girl."
This warning struck me with the force of a physical blow. It was
scarcely possible that Big Sam could be mistaken, and I must reckon
on the attack as an imminent danger. And in swift imagination I
could hear the screams of Laura Kendrick and Mercy Fillmore joining
those of Moon Ying, as they struggled in the grasp of ruffians, and
could see the crackling flames as the raiders left destruction behind
them.
"I have had reason to-night to surmise that something was
afoot," I said, "but I did not suspect this." And then I retailed to Big
Sam the story of the visit of the old Chinaman, the attack of the
three raiders of the early morning, and the questioning of the
mysterious tramp.
"The old man is Chung Toy, sometimes known to your people as
'Little John.' He was, you will remember, the custodian of the girl. He
is now in the employ of the Hop Sings. The white men I can suppose
were spies, sent to reconnoiter, though I am puzzled about the
morning raiders."
"Does your information go so far as to suggest when the attack
will be made?"
"No."
"And have you any word of advice?"
"Advice? Yes. I should advise that you return the girl to my
custody. I confess that she would be an embarrassment--"
"You will not be put in any such awkward position," I
interrupted. "I can speak for Miss Kendrick, and say that she will
keep the girl till the conditions are fulfilled."
"Then," said Big Sam composedly, "I leave to your best
judgment the way to meet the danger." And with a bow that
signified the end of the interview, he clapped his hands, and a young
Chinaman appeared to conduct me down the stairs. And as I passed
the sullen guards, and heard the door bolted and barred behind me,
I admired the diplomacy with which Big Sam had washed his hands
of his responsibilities, and left them to me.
CHAPTER XVIII
LITTLE JOHN AS A MAN OF ACTION
ebooksecure.com