Full Download Core Java For The Impatient 3rd Edition Cay Horstmann PDF
Full Download Core Java For The Impatient 3rd Edition Cay Horstmann PDF
Full Download Core Java For The Impatient 3rd Edition Cay Horstmann PDF
com
https://ebookmeta.com/product/core-java-for-the-
impatient-3rd-edition-cay-horstmann/
OR CLICK BUTTON
DOWLOAD EBOOK
https://ebookmeta.com/product/modern-javascript-for-the-
impatient-1st-edition-cay-s-horstmann/
https://ebookmeta.com/product/core-java-volume-ii-advanced-
features-cay-s-horstmann/
https://ebookmeta.com/product/core-java-vol-ii-advanced-
feature-12th-edition-cay-s-horstmann/
https://ebookmeta.com/product/java-for-everyone-late-objects-cay-
s-horstmann/
Brief C Late Objects 3rd Edition Cay Horstmann
https://ebookmeta.com/product/brief-c-late-objects-3rd-edition-
cay-horstmann/
https://ebookmeta.com/product/big-java-late-objects-enhanced-
etext-2nd-edition-cay-s-horstmann/
https://ebookmeta.com/product/big-c-late-objects-3rd-edition-cay-
s-horstmann/
https://ebookmeta.com/product/openshift-for-developers-a-guide-
for-impatient-beginners-2nd-edition-joshua-wood/
https://ebookmeta.com/product/java-java-java-object-oriented-
problem-solving-3rd-edition-ralph-morelli-ralph-walde/
About This eBook
ePUB is an open, industry-standard format for eBooks.
However, support of ePUB and its many features varies
across reading devices and applications. Use your device or
app settings to customize the presentation to your liking.
Settings that you can customize often include font, font size,
single or double column, landscape or portrait mode, and
figures that you can click or tap to enlarge. For additional
information about the settings and features on your reading
device or app, visit the device manufacturer’s Web site.
Many titles include programming code or configuration
examples. To optimize the presentation of these elements,
view the eBook in single-column, landscape mode and
adjust the font size to the smallest setting. In addition to
presenting code and configurations in the reflowable text
format, we have included images of the code that mimic the
presentation found in the print book; therefore, where the
reflowable format may compromise the presentation of the
code listing, you will see a “Click here to view code image”
link. Click the link to view the print-fidelity code image. To
return to the previous page viewed, click the Back button on
your device or app.
Core Java for the
Impatient
Third Edition
Core Java for the
Impatient
Third Edition
Cay S. Horstmann
ISBN-13: 978-0-13-805210-2
ISBN-10: 0-13-805210-7
ScoutAutomatedPrintCode
Pearson’s Commitment to
Diversity, Equity, and Inclusion
Pearson is dedicated to creating bias-free content that
reflects the diversity of all learners. We embrace the many
dimensions of diversity, including but not limited to race,
ethnicity, gender, socioeconomic status, ability, age, sexual
orientation, and religious or political beliefs.
Education is a powerful force for equity and change in our
world. It has the potential to deliver opportunities that
improve lives and enable economic mobility. As we work
with authors to create content for every product and
service, we acknowledge our responsibility to demonstrate
inclusivity and incorporate diverse scholarship so that
everyone can achieve their potential through learning. As
the world’s leading learning company, we have a duty to
help drive change and live up to our purpose to help more
people create a better life for themselves and to create a
better world.
Our ambition is to purposefully contribute to a world where:
Everyone has an equitable and lifelong opportunity to
succeed through learning.
Our educational products and services are inclusive and
represent the rich diversity of learners.
Our educational content accurately reflects the histories
and experiences of the learners we serve.
Our educational content prompts deeper discussions
with learners and motivates them to expand their own
learning (and worldview).
While we work hard to present unbiased content, we want to
hear from you about any concerns or needs with this
Pearson product so that we can investigate and address
them.
Please contact us with concerns about any potential bias
at https://www.pearson.com/report-bias.xhtml.
To Chi—the most patient person in my life.
Contents
Preface
Acknowledgments
About the Author
2 OBJECT-ORIENTED PROGRAMMING
2.1 Working with Objects
2.1.1 Accessor and Mutator Methods
2.1.2 Object References
2.2 Implementing Classes
2.2.1 Instance Variables
2.2.2 Method Headers
2.2.3 Method Bodies
2.2.4 Instance Method Invocations
2.2.5 The this Reference
2.2.6 Call by Value
2.3 Object Construction
2.3.1 Implementing Constructors
2.3.2 Overloading
2.3.3 Calling One Constructor from Another
2.3.4 Default Initialization
2.3.5 Instance Variable Initialization
2.3.6 Final Instance Variables
2.3.7 The Constructor with No Arguments
2.4 Records
2.4.1 The Record Concept
2.4.2 Constructors: Canonical, Custom, and
Compact
2.5 Static Variables and Methods
2.5.1 Static Variables
2.5.2 Static Constants
2.5.3 Static Initialization Blocks
2.5.4 Static Methods
2.5.5 Factory Methods
2.6 Packages
2.6.1 Package Declarations
2.6.2 The jar Command
2.6.3 The Class Path
2.6.4 Package Access
2.6.5 Importing Classes
2.6.6 Static Imports
2.7 Nested Classes
2.7.1 Static Nested Classes
2.7.2 Inner Classes
2.7.3 Special Syntax Rules for Inner Classes
2.8 Documentation Comments
2.8.1 Comment Insertion
2.8.2 Class Comments
2.8.3 Method Comments
2.8.4 Variable Comments
2.8.5 General Comments
2.8.6 Links
2.8.7 Package, Module, and Overview
Comments
2.8.8 Comment Extraction
Exercises
6 GENERIC PROGRAMMING
6.1 Generic Classes
6.2 Generic Methods
6.3 Type Bounds
6.4 Type Variance and Wildcards
6.4.1 Subtype Wildcards
6.4.2 Supertype Wildcards
6.4.3 Wildcards with Type Variables
6.4.4 Unbounded Wildcards
6.4.5 Wildcard Capture
6.5 Generics in the Java Virtual Machine
6.5.1 Type Erasure
6.5.2 Cast Insertion
6.5.3 Bridge Methods
6.6 Restrictions on Generics
6.6.1 No Primitive Type Arguments
6.6.2 At Runtime, All Types Are Raw
6.6.3 You Cannot Instantiate Type Variables
6.6.4 You Cannot Construct Arrays of
Parameterized Types
6.6.5 Class Type Variables Are Not Valid in
Static Contexts
6.6.6 Methods May Not Clash after Erasure
6.6.7 Exceptions and Generics
6.7 Reflection and Generics
6.7.1 The Class<T> Class
6.7.2 Generic Type Information in the Virtual
Machine
Exercises
7 COLLECTIONS
7.1 An Overview of the Collections Framework
7.2 Iterators
7.3 Sets
7.4 Maps
7.5 Other Collections
7.5.1 Properties
7.5.2 Bit Sets
7.5.3 Enumeration Sets and Maps
7.5.4 Stacks, Queues, Deques, and Priority
Queues
7.5.5 Weak Hash Maps
7.6 Views
7.6.1 Small Collections
7.6.2 Ranges
7.6.3 Unmodifiable Views
Exercises
8 STREAMS
8.1 From Iterating to Stream Operations
8.2 Stream Creation
8.3 The filter, map, and flatMap Methods
8.4 Extracting Substreams and Combining
Streams
8.5 Other Stream Transformations
8.6 Simple Reductions
8.7 The Optional Type
8.7.1 Producing an Alternative
8.7.2 Consuming the Value If Present
8.7.3 Pipelining Optional Values
8.7.4 How Not to Work with Optional Values
8.7.5 Creating Optional Values
8.7.6 Composing Optional Value Functions
with flatMap
8.7.7 Turning an Optional into a Stream
8.8 Collecting Results
8.9 Collecting into Maps
8.10 Grouping and Partitioning
8.11 Downstream Collectors
8.12 Reduction Operations
8.13 Primitive Type Streams
8.14 Parallel Streams
Exercises
Index
Preface
Java has seen many changes since its initial release in 1996.
The classic book, Core Java, covers, in meticulous detail, not
just the language but all core libraries and a multitude of
changes between versions, spanning two volumes and over
2,000 pages. However, if you just want to be productive
with modern Java, there is a much faster, easier pathway for
learning the language and core libraries. In this book, I don’t
retrace history and don’t dwell on features of past versions.
I show you the good parts of Java as it exists today, so you
can put your knowledge to work quickly.
As with my previous “Impatient” books, I quickly cut to the
chase, showing you what you need to know to solve a
programming problem without lecturing about the
superiority of one paradigm over another. I also present the
information in small chunks, organized so that you can
quickly retrieve it when needed.
Assuming you are proficient in some other programming
language, such as C++, JavaScript, Swift, PHP, or Ruby, with
this book you will learn how to become a competent Java
programmer. I cover all aspects of Java that a developer
needs to know today, including the powerful concepts of
lambda expressions and streams, as well as modern
constructs such as records and sealed classes.
A key reason to use Java is to tackle concurrent
programming. With parallel algorithms and threadsafe data
structures readily available in the Java library, the way
application programmers should handle concurrent
programming has completely changed. I provide fresh
coverage, showing you how to use the powerful library
features instead of error-prone low-level constructs.
Traditionally, books on Java have focused on user interface
programming, but nowadays, few developers produce user
interfaces on desktop computers. If you intend to use Java
for server-side programming or Android programming, you
will be able to use this book effectively without being
distracted by desktop GUI code.
Finally, this book is written for application programmers, not
for a college course and not for systems wizards. The book
covers issues that application programmers need to wrestle
with, such as logging and working with files, but you won’t
learn how to implement a linked list by hand or how to write
a web server.
I hope you enjoy this rapid-fire introduction into modern
Java, and I hope it will make your work with Java productive
and enjoyable.
If you find errors or have suggestions for improvement,
please visit http://horstmann.com/javaimpatient, head for the
errata page, and leave a comment. Be sure to visit that site
to download the runnable code examples that complement
this book.
Cay Horstmann
Berlin
August 2022
About the Author
Cay S. Horstmann is the author of JavaScript for the
Impatient and Scala for the Impatient (both from Addison-
Wesley), is principal author of Core Java, Volumes I and II,
Twelfth Edition (Pearson, 2022), and has written a dozen
other books for professional programmers and computer
science students. He is professor emeritus of computer
science at San Jose State University and is a Java Champion.
Chapter 1
Fundamental
Programming Structures
In this chapter, you will learn about the basic data types and
control structures of the Java language. I assume that you
are an experienced programmer in some other language
and that you are familiar with concepts such as variables,
loops, function calls, and arrays, but perhaps with a different
syntax. This chapter will get you up to speed on the Java
way. I will also give you some tips on the most useful parts
of the Java API for manipulating common data types.
The key points of this chapter are:
Note
You have just seen a // comment that extends to the
end of the line. You can also have multiline comments
between /* and */ delimiters, such as
Click here to view code image
/*
This is the first sample program in Core Java
for the Impatient.
The program displays the traditional greeting
"Hello, World!".
*/
Note
The javac compiler is invoked with the name of a file,
with slashes separating the path segments, and an
extension .java. The java virtual machine launcher is
invoked with the name of a class, with dots separating
the package segments, and no extension.
Note
If your program consists of a single source file, then
you can skip the compilation step and run the program
with the command
Click here to view code image
java ch01/sec01/HelloWorld.java
Note
On Unix-like operating systems, you can turn a Java
file into an executable program by following these
steps:
There was a crackling and a roar. When the noise died down, a voice
in Russian said, "This is Eratosthenes. You will refrain from further
radio communication until permission is received to resume.
Acknowledge."
"Colonel Scone on the United Soviet Americas Force destroyer
Broun. Order acknowledged."
He flipped the switch off. To Broward, he said, "Damn Russkies are
starting to clamp down already. But they're rattled. Did you notice I
was talking to Pei in English, and they didn't say a thing about that? I
don't think they'll take much effective action or start any witch-hunts
until they recover fully from the shock and have a chance to evaluate.
"Tell me, is Nashdoi one of you Athenians?"
Broward looked at Nashdoi, who was slumped on a seat at the other
end of the bridge. She was not within earshot of a low voice.
"No," said Broward. "I don't think she's anything but a lukewarm
Marxist. She's a member of the Party, of course. Who on the Moon
isn't? But like so many scientists here, she takes a minimum interest
in ideology, just enough not to be turned down when she applied for
psychological research here.
"She was married, you know. Her husband was called back to Earth
only a little while ago. No one knew if it was for the reasons given or if
he'd done something to displease the Russkies or arouse their
suspicions. You know how it is. You're called back, and maybe you're
never heard of again."
"What other way is there?" said Scone. "Although I don't like the
Russky dictating the fate of any American."
"Yes?" said Broward. He looked curiously at Scone, thinking of what a
mass of contradictions, from his viewpoint, existed inside that
massive head. Scone believed thoroughly in the Soviet system
except for one thing. He was a Nationalist; he wanted an absolutely
independent North American republic, one which would reassert its
place as the strongest in the world.
And that made him dangerous to the Russians and the Chinese.
America had fallen, prey more to its own softness and confusion than
to the machinations of the Soviets. Then, in the turbulent bloody
starving years that followed the fall with their purges, uprisings,
savage repressions, mass transportations to Siberia and other areas,
importation of other nationalities to create division, and bludgeoning
propaganda and reeducation, only the strong and the intelligent
survived.
Scone, Broward, and Nashdoi were of the second generation born
after the fall of Canada and the United States. They had been born
and had lived because their parents were flexible, hardy, and quick.
And because they had inherited and improved these qualities.
The Americans had become a problem to the Russians. And to the
Chinese. Those Americans transported to Siberia had, together with
other nationalities brought to that area, performed miracles with the
harsh climate and soil, had made a garden. But they had become
Siberians, not too friendly with the Russians.
China, to the south, looking for an area in which to dump their excess
population, had protested at the bringing in of other nationalities.
Russia's refusal to permit Chinese entry had been one more added to
the long list of grievances felt by China towards her elder brother in
the Marx family.
And on the North American continent, the American Communists had
become another trial to Moscow. Russia, rich with loot from the U.S.,
had become fat. The lean underfed hungry Americans, using the
Party to work within, had alarmed the Russians with their increasing
power and influence. Moreover, America had recovered, was again a
great industrial empire. Ostensibly under Russian control, the
Americans were pushing and pressuring subtly, and not so subtly, to
get their own way. Moscow had to resist being Uncle Samified.
To complicate the world picture, thousands of North Americans had
taken refuge during the fall of their country in Argentine. And there
the energetic and tough-minded Yanks (the soft and foolish died on
the way or after reaching Argentine) followed the paths of thousands
of Italians and Germans who had fled there long ago. They became
rich and powerful; Félipé Howards, El Macho, was part-Argentinean
Spanish, part-German, part-American.
The South African (sub-Saharan) peoples had ousted their
Communist and Fascist rulers because they were white or white-
influenced. Pan-Africanism was their motto. Recently, the South
African Confederation had formed an alliance with Argentine. And the
Axis had warned the Soviets that they must cease all underground
activity in Axis countries, cease at once the terrible economic
pressures and discriminations against them, and treat them as full
partners in the nations of the world.
If this were not done, and if a war started, and the Argentineans saw
their country was about to-be crushed, they would explode cobalt
bombs. Rather death than dishonor.
The Soviets knew the temper of the proud and arrogant
Argentineans. They had seemed to capitulate. There was a
conference among the heads of the leading Soviets and Axes.
Peaceful coexistence was being talked about.
But, apparently, the Axis had not swallowed this phrase as others had
once swallowed it. And they had decided on a desperate move.
Having cheap lithium bombs and photon compressors and the means
to deliver them with gravitomagnetic drives, the Axis was as well
armed as their foes. Perhaps, their thought must have been, if they
delivered the first blow, their anti-missiles could intercept enough
Soviet missiles so that the few that did get through would do a
minimum of damage. Perhaps. No one really knew what caused the
Axis to start the war.
Whatever the decision of the Axis, the Axis had put on a good show.
One of its features was the visit by their Moon officers to the base at
Eratosthenes, the first presumably, in a series of reciprocal visits and
parties to toast the new amiable relations.
Result: a dying Earth and a torn Moon.
Broward sat down by Ingrid Nashdoi. She was a short dark and petite
woman of about thirty-three. Not very good-looking but, usually, witty
and vivacious. Now, she stared at the floor, her face frozen.
"I'm sorry about Jim," he said. "But we don't have time to grieve now.
Later, perhaps."
She did not look at him but replied in a low halting voice. "He may
have been dead before the war started. I never even got to say
goodbye to him. You know what that means. What it probably did
mean."
"I don't think they got anything out of him. Otherwise, you and I would
have been arrested, too."
He jerked his head towards Scone and said, "He doesn't know you're
one of us. I want him to think you're a candidate for the Nationalists.
After this struggle with the Russ is over, we may need someone who
can report on him. Think you can do it?"
She nodded her head, and Broward returned to Scone. "She hates
the Russians," he said. "You know they took her husband away. She
doesn't know why. But she hates Ivan's guts."
"Good. Ah, here we go."
After the destroyer had berthed at Clavius, and the three entered the
base, events went swiftly if not smoothly. Scone talked to the entire
personnel over the IP, told them what had happened. Then he went to
his office and issued orders to have the arsenal cleaned out of all
portable weapons. These were transferred to the four destroyers the
Russians had assigned to Clavius as a token force.
Broward then called in his four Athenians and Scone, his five
Nationalists. The situation was explained to them, and they were
informed of what was expected of them. Even Broward was startled,
but didn't protest.
After the weapons had been placed in the destroyers, Scone ordered
the military into his office one at a time. And, one at a time, they were
disarmed and escorted by another door to the arsenal and locked in.
Three of the soldiers asked to join Scone, and he accepted two.
Several protested furiously and denounced Scone as a traitor.
Then, Scone had the civilians assembled in the large auditorium.
(Technically, all personnel were in the military, but the scientists were
only used in that capacity during emergencies.) Here, he told them
what he had done, what he planned to do—except for one thing—and
asked them if they wished to enlist. Again, he got a violent
demonstration from some and sullen silence from others. These were
locked up in the arsenal.
The others were sworn in, except for one man, Whiteside. Broward
pointed him out as an agent and informer for both the Russians and
Chinese. Scone admitted that he had not known about the triple-
dealer, but he took Broward's word and had Whiteside locked up, too.
Then, the radios of the two scout ships were smashed, and the
prisoners marched out and jammed into them. Scone told them they
were free to fly to the Russian base. Within a few minutes, the scouts
hurtled away from Clavius towards the north.
"But, Colonel," said Broward, "they can't give the identifying code to
the Russians. They'll be shot down."
"They are traitors; they prefer the Russky to us. Better for us if they
are shot down. They'll not fight for Ivan."
Broward did not have much appetite when he sat down to eat and to
listen to Scone's detailing of his plan.
"The Zemlya," he said, "has everything we need to sustain us here.
And to clothe the Earth with vegetation and replace her animal life in
the distant future when the radiation is low enough for us to return.
Her deepfreeze tanks contain seeds and plants of thousands of
different species of vegetation. They also hold, in suspended
animation, the bodies of cattle, sheep, horses, rabbits, dogs, cats,
fowl, birds, useful insects and worms. The original intention was to
reanimate these and use them on any Terrestrial-type planet the
Zemlya might find.
"Now, our bases here are self-sustaining. But, when the time comes
to return to Earth, we must have vegetation and animals. Otherwise,
what's the use?
"So, whoever holds the Zemlya holds the key to the future. We must
be the ones who hold that key. With it, we can bargain; the Russians
and the Chinese will have to agree to independence if they want to
share in the seeds and livestock."
"What if the Zemlya's commander chooses destruction of his vessel
rather than surrender?" said Broward. "Then, all of humanity will be
robbed. We'll have no future."
"I have a plan to get us aboard the Zemlya without violence."
For several minutes, the Zemlya did not answer. Shaposhnikov must
have been unnerved. Undoubtedly, he was in a quandary. In any
case, he could not prevent the strangers from approaching. If they
were Axis, they had him at their mercy.
Such must have been his reasoning. He replied, "Come ahead."
By then, the USAF dishes had matched their speeds to that of the
Zemlya's. From a distance of only a kilometer, the sphere looked like
a small Earth. It even had the continents painted on the surface,
though the effect was spoiled by the big Russian letters painted on
the Pacific Ocean.
Scone gave a lateral thrust to his vessel, and it nudged gently into the
enormous landing-port of the sphere. Within five minutes, his crew of
ten were in the control room.
Scone did not waste any time. He drew his gun; his men followed
suit; he told Shaposhnikov what he meant to do. The Russian, a tall
thin man of about fifty, seemed numbed. Perhaps, too many
catastrophes had happened in too short a time. The death of Earth,
the attack by the Axis ships, and, now, totally unexpected, this. The
world was coming to an end in too many shapes and too swiftly.
Scone cleared the control room of all Zemlya personnel except the
commander. The others were locked up with the forty-odd men and
women who were surprised at their posts by the Americans.
Scone ordered Shaposhnikov to set up orders to the navigational
computer for a new path. This one would send the Zemlya at the
maximum acceleration endurable by the personnel towards a point in
the south polar region near Clavius. When the Zemlya reached the
proper distance, it would begin a deceleration equally taxing which
would bring it to a halt approximately half a kilometer above the
surface at the indicated point.
Shaposhnikov, speaking disjointedly like a man coming up out of a
nightmare, protested that the Zemlya was not built to stand such a
strain. Moreover, if Scone succeeded in his plan to hide the great
globe at the bottom of a chasm under an overhang.... Well, he could
only predict that the lower half of the Zemlya would be crushed under
the weight—even with the Moon's weak gravity.
"That won't harm the animal tanks," said Scone. "They're in the upper
levels. Do as I say. If you don't, I'll shoot you and set up the computer
myself."
"You are mad," said Shaposhnikov. "But I will do my best to get us
down safely. If this were ordinary war, if we weren't man's—Earth's—
last hope, I would tell you to go ahead, shoot. But...."
Ingrid Nashdoi, standing beside Broward, whispered in a trembling
voice, "The Russian is right. He is mad. It's too great a gamble. If we
lose, then everybody loses."
"Exactly what Scone is betting on," murmured Broward. "He knows
the Russians and Chinese know it, too. Like you, I'm scared. If I could
have foreseen what he was going to do, I think I'd have put a bullet in
him back at Eratosthenes. But it's too late to back out now. We go
along with him no matter what."
The voyage from the Moon and the capture of the Zemlya had taken
twelve hours. Now, with the Zemlya's mighty drive applied—and the
four destroyers riding in the landing-port—the voyage back took three
hours. During this time, the Russian base sent messages. Scone
refused to answer. He intended to tell all the Moon his plans but not
until the Zemlya was close to the end of its path. When the globe was
a thousand kilometers from the surface, and decelerating with the
force of 3g's, he and his men returned to the destroyers. All except
three, who remained with Shaposhnikov.
The destroyers streaked ahead of the Zemlya towards an entrance to
a narrow canyon. This led downwards to a chasm where Scone
intended to place the Zemlya beneath a giant overhang.
But, as the four sped towards the opening two crags, their radar
picked up four objects coming over close to the mountains to the
north. A battlebird and three destroyers. Scone knew that the
Russians had another big craft and three more destroyers available.
But they probably did not want to send them out, too, and leave the
base comparatively defenseless.
He at once radioed the commander of the Lermontov and told him
what was going on.
"We declare independence, a return to Nationalism," he concluded.
"And we call on the other bases to do the same."
The commander roared, "Unless you surrender at once, we turn on
the bonephones! And you will writhe in pain until you die, you
American swine!"
"Do that little thing," said Scone, and he laughed.
He switched on the communication beams linking the four ships and
said, "Hang on for a minute or two, men. Then, it'll be all over. For us
and for them."
Two minutes later, the pain began. A stroke of heat like lightning that
seemed to sear the brains in their skulls. They screamed, all except
Scone, who grew pale and clutched the edge of the control panel. But
the dishes were, for the next two minutes, on automatic, unaffected
by their pilots' condition.
And then, just as suddenly as it had started, the pain died. They were
left shaking and sick, but they knew they would not feel that
unbearable agony again.
"Flutter your craft as if it's going out of control," said Scone. "Make it
seem we're crashing into the entrance to the canyon."
Scone himself put the lead destroyer through the simulation of a craft
with a pain-crazed pilot at the controls. The others followed his
maneuvers, and they slipped into the canyon.
From over the top of the cliff to their left rose a glare that would have
been intolerable if the plastic over the portholes had not automatically
polarized to dim the brightness.
Broward, looking through a screen which showed the view to the rear,
cried out. Not because of the light from the atomic bomb which had
exploded on the other side of the cliff. He yelled because the top of
the Zemlya had also lit up. And he knew in that second what had
happened. The light did not come from the warhead, for an extremely
high mountain was between the huge globe and the blast. If the
upper region of the Zemlya glowed, it was because a tongue from a
Russian ship had brushed against it.
It must have been an accident, for the Russians surely had no wish to
wreck the Zemlya. If they defeated the USAF, they could recapture
the globe with no trouble.
"My God, she's falling!" yelled Broward. "Out of control!"
Scone looked once and quickly. He turned away and said, "All craft
land immediately. All personnel transfer to my ship."
The maneuver took three minutes, for the men in the other dishes
had to connect air tanks to their suits and then run from their ships to
Scone's. Moreover, one man in each destroyer was later than his
fellows since he had to set up the controls on his craft.
Scone did not explain what he meant to do until all personnel had
made the transfer. In the meantime, they were at the mercy of the
Russians if the enemy had chosen to attack over the top of the cliff.
But Scone was gambling that the Russians would be too horrified at
what was happening to the Zemlya. His own men would have been
frozen if he had not compelled them to act. The Earth dying twice
within twenty-four hours was almost more than they could endure.
Only the American commander, the man of stone, seemed not to feel.
Scone took his ship up against the face of the cliff until she was just
below the top. Here the cliff was thin because of the slope on the
other side. And here, hidden from view of the Russians, he drove a
tongue two decimeters wide through the rock.
And, at the moment three Russian destroyers hurtled over the edge,
tongues of compressed light lashing out on every side in the classic
flailing movement, Scone's beam broke through the cliff.
The three empty USAF ships, on automatic, shot upwards at a speed
that would have squeezed their human occupants into jelly—if they
had had occupants. Their tongues shot out and flailed, caught the
Russian tongues, twisted, shot out and flailed, caught the Russian
tongues, twisted as the generators within the USAF vessels strove to
outbend the Russian tongues.
Then, the American vessels rammed into the Russians, drove them
upwards, flipped them over. And all six craft fell along the cliff's face,
Russian and American intermingled, crashing into each other,
bouncing off the sheer face, exploding, their fragments colliding, and
smashed into the bottom of the canyon.
Scone did not see this, for he had completed the tongue through the
tunnel, turned it off for a few seconds, and sent a video beam
through. He was just in time to see the big battlebird start to float off
the ground where it had been waiting. Perhaps, it had not
accompanied the destroyers because of Russian contempt for
American ability. Or, perhaps, because the commander was under
orders not to risk the big ship unless necessary. Even now, the
Lermontov rose slowly as if it might take two paths: over the cliff or
towards the Zemlya. But, as it rose, Scone applied full power.
Some one, or some detecting equipment, on the Lermontov must
have caught view of the tongue as it slid through space to intercept
the battlebird. A tongue shot out towards the American beam. But
Scone, in full and superb control, bent the axis of his beam, and the
Russian missed. Then Scone's was in contact with the hull, and a
hole appeared in the irradiated plastic.
Majestically, the Lermontov continued rising—and so cut itself almost
in half. And, majestically, it fell.
Not before the Russian commander touched off all the missiles
aboard his ship in a last frenzied defense, and the missiles flew out in
all directions. Two hit the slope, blew off the face of the mountain on
the Lermontov's side, and a jet of atomic energy flamed out through
the tunnel created by Scone.
But he had dropped his craft like an elevator, was halfway down the
cliff before the blasts made his side of the mountain tremble.
Half an hour later, the base of Eratosthenes sued for peace. For the
sake of human continuity, said Panchurin, all fighting must cease
forever on the moon.
The Chinese, who had been silent up to then despite their comrades'
pleas for help, also agreed to accept the policy of Nationalism.
Now, Broward expected Scone to break down, to give way to the
strain. He would only have been human if he had done so.
He did not. Not, at least, in anyone's presence.