Beginning Programming With Java For Dummies 6th Edition Barry Burd PDF Download
Beginning Programming With Java For Dummies 6th Edition Barry Burd PDF Download
https://ebookmass.com/product/beginning-programming-with-java-for-
dummies-6th-edition-barry-burd/
https://ebookmass.com/product/java-for-dummies-8th-edition-barry-burd/
https://ebookmass.com/product/learning-java-beginning-programming-
with-java-for-dummies-bach/
https://ebookmass.com/product/beginning-programming-with-python-for-
dummies-3rd-edition-john-paul-mueller/
https://ebookmass.com/product/excel-vba-programming-for-dummies-6th-
edition-dick-kusleika/
ARTHRITIS FOR DUMMIES. 3rd Edition Barry Fox
https://ebookmass.com/product/arthritis-for-dummies-3rd-edition-barry-
fox/
https://ebookmass.com/product/java-programming-9th-edition-joyce-
farrell/
https://ebookmass.com/product/hacking-for-dummies-for-dummies-
computer-tech-7th-edition-beaver/
https://ebookmass.com/product/introduction-to-programming-with-java-a-
problem-solving-approach-3rd-edition-john-dean/
https://ebookmass.com/product/etextbook-pdf-for-murachs-java-
programming-5th-edition-by-joel-murach/
1.12 in 7.375 x 9.25 in
6th Edition
Beginning Programming with Java For Dummies gives you a step-by-step guide 6th Edition
for learning how to code in Java, one of the most popular programming
languages in the world. This friendly and straightforward guide starts
you off with beginner activities, such as setting up your computer and
Beginning Programming
Beginning Programming
walking through the development environment, but it doesn’t stop there.
with Java
It continues exploring activities like creating your first program, debugging
and compiling, and more. You’ll no longer be a Java beginner with this book!
®
with Java
• Learn the elements of a Java program Barry Burd, PhD holds an MS
in Computer Science from Rut-
• Type and run your own code gers University and a PhD in
®
• Program using IntelliJ IDEA Mathematics from the University
®
of Illinois. Barry is the author of
• Explore variables, values, and types numerous For Dummies books,
including Java For Dummies and
• Write code to make decisions and Learn basic programming
Beginning Programming with Java
run loops For Dummies. concepts and methods
• Use methods to write good code
• Create programs with objects Build a foundation of code
and classes before writing your own program
Cover Image: © Anees Alangadan/
Shutterstock; kowalskichal/Shutterstock
Computers/Programming Languages/Java
$29.99 USA/$35.99 CAN/£21.99 UK
6th Edition
by Barry Burd
0005193789.INDD iii Trim size: 7.375 in × 9.25 in August 19, 2021 4:09 PM
Beginning Programming with Java® For Dummies®, 6th Edition
Published by: John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, www.wiley.com
Copyright © 2021 by John Wiley & Sons, Inc., Hoboken, New Jersey
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any
means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections
107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the Publisher. Requests to
the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River
Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.
Trademarks: Wiley, For Dummies, the Dummies Man logo, Dummies.com, Making Everything Easier, and related
trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and may not be used without written
permission. Java is a registered trademark of Oracle America, Inc. All other trademarks are the property of their
respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
For general information on our other products and services, please contact our Customer Care Department within
the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002. For technical support, please visit
https://hub.wiley.com/community/support/dummies.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with
standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to
media such as a CD or DVD that is not included in the version you purchased, you may download this material at
http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.
0005193789.INDD iv Trim size: 7.375 in × 9.25 in August 19, 2021 4:09 PM
Contents at a Glance
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
TOC.indd v Trim size: 7.375 in × 9.25 in August 19, 2021 6:09 PM
TOC.indd vi Trim size: 7.375 in × 9.25 in August 19, 2021 6:09 PM
Table of Contents
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
About This Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Foolish Assumptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Icons Used in This Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Beyond the Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Where to Go from Here. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
TOC.indd vii Trim size: 7.375 in × 9.25 in August 19, 2021 6:09 PM
CHAPTER 3: Running Programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Running a Canned Java Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Getting the code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Adding the code to IntelliJ IDEA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Running the code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52
Some Programs Don’t Come in Cans. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
What’s All That Stuff in the IntelliJ IDEA Window?. . . . . . . . . . . . . . . . . . 61
Starting up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
The main window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
TOC.indd viii Trim size: 7.375 in × 9.25 in August 19, 2021 6:09 PM
CHAPTER 6: Using the Building Blocks: Variables, Values,
and Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Various Variables and Ways in Which They Vary . . . . . . . . . . . . . . . . . 128
Using a variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Understanding assignment statements. . . . . . . . . . . . . . . . . . . . . . 130
To wrap or not to wrap?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
What Do All Those Zeros and Ones Mean?. . . . . . . . . . . . . . . . . . . . . . 132
Types and declarations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
What’s the point?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Reading Decimal Numbers from the Keyboard. . . . . . . . . . . . . . . . . . 135
Though these be methods, yet there is madness in’t . . . . . . . . . . 136
Methods and assignments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Variations on a Theme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
If it looks like a double and smells like a double . . .. . . . . . . . . . . . 139
Moving variables from place to place. . . . . . . . . . . . . . . . . . . . . . . . 141
Combining variable declarations. . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Experimenting with JShell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Table of Contents ix
TOC.indd ix Trim size: 7.375 in × 9.25 in August 19, 2021 6:09 PM
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
PART 3: CONTROLLING THE FLOW. . . . . . . . . . . . . . . . . . . . . . . . . . . 197
CHAPTER 9: Forks in the Road. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
TOC.indd x Trim size: 7.375 in × 9.25 in August 19, 2021 6:09 PM
CHAPTER 12: Circling Back to Java Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Repeating Statements a Certain Number of Times (Java for
Statements) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Esprit de for. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Initializing a for loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Shut up and chew!. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Repeating Until You Get What You Need (Java do Statements). . . . . 284
Holding out for a trustworthy response . . . . . . . . . . . . . . . . . . . . . 285
Deleting a file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Taming of the do. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
Repeat performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
CHAPTER 14: Using Methods and Fields from a Java Class. . . . . . . 315
Long Live the String!. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
A simple example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Putting String variables to good use. . . . . . . . . . . . . . . . . . . . . . . . . 317
Reading and writing strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Using an Object’s Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Comparing strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
The truth about classes and methods. . . . . . . . . . . . . . . . . . . . . . . 324
Calling an object’s methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Combining and using data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
How to Achieve Static Equilibrium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Calling static and nonstatic methods. . . . . . . . . . . . . . . . . . . . . . . . 328
Turning strings into numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Turning numbers into strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Table of Contents xi
TOC.indd xi Trim size: 7.375 in × 9.25 in August 19, 2021 6:09 PM
Turning numbers into nice looking strings. . . . . . . . . . . . . . . . . . . 334
Your country; your currency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
The View from On High. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335
Unravelling Java’s import declarations. . . . . . . . . . . . . . . . . . . . . . . 336
Shedding light on the static darkness . . . . . . . . . . . . . . . . . . . . . . . 338
Barry makes good on an age-old promise. . . . . . . . . . . . . . . . . . . . 339
Overload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Running a Disk-Oriented Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Reading and writing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Messing with files on your hard drive . . . . . . . . . . . . . . . . . . . . . . . 382
Running disk-oriented code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
File and error. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Writing a Disk-Oriented Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Reading from a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Writing to a file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Writing, Rewriting, and Re-Rewriting . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
TOC.indd xii Trim size: 7.375 in × 9.25 in August 19, 2021 6:09 PM
CHAPTER 17: How to Flick a Virtual Switch. . . . . . . . . . . . . . . . . . . . . . . . . 401
Meet the switch Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Anatomy of a switch statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Picky details about the switch statement . . . . . . . . . . . . . . . . . . . . 405
A Switch in Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
Dissecting the switch expression . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
Can you switch between two kinds of switch? . . . . . . . . . . . . . . . . 411
Your Grandparents’ switch Statement. . . . . . . . . . . . . . . . . . . . . . . . . . 416
Using a Conditional Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
TOC.indd xiii Trim size: 7.375 in × 9.25 in August 19, 2021 6:09 PM
Drag-and-Drop for GUI Greatness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
Hello, GUI Designer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
Window dressing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
Taking action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
ArrayList. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
Integer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
JFrame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
JOptionPane. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
Math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
NumberFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
Scanner. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
String. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
INDEX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
TOC.indd xiv Trim size: 7.375 in × 9.25 in August 19, 2021 6:09 PM
Introduction
W hat’s your story?
»» Are you a working stiff, interested in knowing more about the way your
company’s computers work?
»» Are you a student who needs to complete some extra reading in order to
survive a beginning computer course?
»» Are you a typical computer user — you’ve done lots of word processing and
you want to do something more interesting with your computer?
»» Are you a job seeker with an interest in entering the fast-paced, glamorous,
high-profile world of computer programming (or, at least, the decent-paying
world of computer programming)?
Well, if you want to write computer programs, this book is for you. This book
avoids the snobby of-course-you-already-know assumptions and describes com-
puter programming from scratch.
In this book, I assume very little about your experience with computers. As you
read each section, you get to see inside my mind. You see the problems that I face,
the things that I think, and the solutions that I find. Some problems are the kind
that I remember facing when I was a novice; other problems are the kind that I
face as an expert. I help you understand, I help you visualize, and I help you create
solutions on your own. I even get to tell a few funny stories.
Introduction 1
Introduction.indd 1 Trim size: 7.375 in × 9.25 in August 19, 2021 6:10 PM
Foolish Assumptions
In this book, I make a few assumptions about you, the reader. If one of these
assumptions is incorrect, you’re probably okay. If all these assumptions are incor-
rect . . . well, buy the book anyway.
»» I assume that you have access to a computer. Here’s good news. You can
run the code in this book on almost any computer. The only computers you
can’t use to run this code are ancient things that are more than eight years old
(give or take a few years). You can run the latest version of Java on Windows,
Macintosh, and Linux computers.
»» I assume that you can navigate your computer’s common menus and
dialog boxes. You don’t have to be a Windows, Linux, or Macintosh power
user, but you should be able to start a program, find a file, put a file into a
certain directory — that sort of thing. Most of the time, when you practice the
stuff in this book, you’re typing code on your keyboard, not pointing and
clicking the mouse.
On those rare occasions when you need to drag and drop, cut and paste, or
plug and play, I guide you carefully through the steps. But your computer may
be configured in any of several billion ways, and my instructions may not quite
fit your special situation. So, when you reach one of these platform-specific
tasks, try following the steps in this book. If the steps don’t quite fit, send me
an email message or consult a book with instructions tailored to your system.
»» I assume that you can think logically. That’s all there is to computer
programming — thinking logically. If you can think logically, you have it made.
If you don’t believe that you can think logically, read on. You may be pleasantly
surprised.
Introduction.indd 2 Trim size: 7.375 in × 9.25 in August 19, 2021 6:10 PM
I twist my head a little bit. That way, whoever’s listening to me (usually nobody)
knows that I’m off on a momentary tangent.
Of course, in print, you can’t see me twisting my head. I need some other way of
setting a side thought in a corner by itself. I do it with icons. When you see a Tip
icon or a Remember icon, you know that I’m taking a quick detour.
A tip is an extra piece of information — something helpful that the other books
may forget to tell you.
Everyone makes mistakes. Heaven knows that I’ve made a few in my time. Any-
way, when I think of a mistake that people are especially prone to make, I write
about the mistake in a Warning icon.
Sometimes I want to hire a skywriting airplane crew. “Barry,” says the white
smoky cloud, “if you want to compare two numbers, use the double equal sign.
Please don’t forget to do this.” Because I can’t afford skywriting, I have to settle
for something more modest. I create a paragraph with the Remember icon.
Writing computer code is an activity, and the best way to learn an activity is to
practice it. That’s why I’ve created things for you to try in order to reinforce your
knowledge. Many of these are confidence-builders, but some are a bit more chal-
lenging. When you first start putting things into practice, you discover all kinds of
issues, quandaries, and roadblocks that didn’t occur to you when you started
reading about the material. But that’s a good thing. Keep at it! Don’t become
frustrated. Or, if you do become frustrated, visit this book’s website (http://
beginprog.allmycode.com) for hints and solutions.
Occasionally, I run across a technical tidbit. The tidbit may help you understand
what the people behind the scenes (the people who developed Java) were thinking.
You don’t have to read it, but you may find it useful. You may also find the tidbit
helpful if you plan to read other (more geeky) books about Java.
This icon calls attention to useful material that you can find online. (You don’t
have to wait long to see one of these icons. I use one at the end of this
introduction!)
Introduction 3
Introduction.indd 3 Trim size: 7.375 in × 9.25 in August 19, 2021 6:10 PM
Beyond the Book
In addition to what you’re reading right now, this book comes with a free access-
anywhere Cheat Sheet containing code that you can copy and paste into your own
Java program. To get this Cheat Sheet, simply go to www.dummies.com and type
Beginning Programming with Java For Dummies Cheat Sheet in the Search box.
If you like what you read, send me an email, post on my Facebook wall, or give me
a tweet. My email address, which I created just for comments and questions about
this book, is [email protected]. My Facebook page is /allmycode, and
my Twitter handle is @allmycode. And don’t forget: To get the latest information,
visit this book’s support website: http://beginprog.allmycode.com.
Introduction.indd 4 Trim size: 7.375 in × 9.25 in August 19, 2021 6:10 PM
1 Getting
Started
with Java
Programming
"Ei kukaan ole sanonut niin typeriä asioita kuin Marcus Aurelius",
sanoi Judith suuttuneena.
Minä nauroin. Oli hyvin hauskaa istua tässä tulen edessä, joka
iloisella tavallaan pani vastalauseen pimeän ulkomaailman synkkyyttä
vastaan, ja hiukan kiusata Judithia.
Minä astuin hänen elämäänsä, kun hän katsoi sen olevan ohitse —
hän oli silloin kaksikymmentäkahdeksan vuotta vanha — ja
kärsivällisesti tyytyi elämään haudattuna pieneen roomalaiseen
täyshoitolaan. Kuinka kauan tätä kärsivällisyyttä olisi kestänyt, sitä
en voi sanoa. Jos olosuhteet olisivat olleet toisenlaiset, mitä silloin
olisi tapahtunut? sellainen kysymys on kaikista kysymyksistä turhin.
Se mikä todella tapahtui oli, että me molemmat tuuliajolla olevat
ihmisraukat jouduimme yhteen ja sitten jatkoimme yhdessäoloa, siitä
yksinkertaisesta syystä, ettei ollut mitään voimia meitä erottamassa.
Hän ei enää välittänyt hitustakaan yhteiskunnan hyväksymisestä;
hyvän maineensa hän jo aikoja sitten oli katsonut olleeksi ja
menneeksi; ja minä, joka olin yksin ja ilman ystäviä harmaassa
maailmassa, miksi minä olisin hylännyt ainoan ystävällisen käden,
joka minulle tarjottiin? Niinkuin iltapäivällä sanoin hänelle:
Minkätähden hyvä Jumala ei meitä hyväksyisi? Sen kohteliaisuuden
olen valmis suomaan hänelle, että luulen häntä jalomieliseksi
Jumalaksi.
"Ja koko tällä ajalla", sanoin puoli tuntia myöhemmin, "et ole
maininnut, minne aiot lähteä."
"Huomenna."
"Huomenna?"
"Sen tein eilen illalla. Panin maata kello neljä tänä aamuna. Päätin
matkustaa vasta sen jälkeen, kuin sinä olit mennyt", hän lisäsi
arvaten, mikä seuraava kysymykseni olisi ollut.
Toukok. 24 p.
"Ainakin voin sanoa teille, mitä niin nuoren tytön kuin teidän ei
pidä tehdä", minä sanoin. "Hänen ei pidä ruveta keskustelemaan
herrojen kanssa julkisissa paikoissa."
Minä antauduin!
Hän pudisti surullisesti päätään. "Ja minun alkaa olla niin nälkä."
Minä huomautin, että Lontoossa on ravintoloita.
"Mutta minulla ei ole yhtään rahaa", lausui hän. "Ei yhtään rahaa
eikä mitään muutakaan paitsi tämä." Hän osoitti pukuaan. "Eikö se
ole ruma?"
"No, mitä minun pitää tehdä? Sanokaa minulle se, niin minä teen
sen.
Jos ette sano sitä, pitää minun kuolla."
"Voin antaa teille vähän rahoja, niin että tulette toimeen pari
päivää", minä sanoin, "mutta miten voin saada käsiini Harryn
tietämättä hänen nimeään, sitä —."
"Alexandrettasta."
"Minkä muurin?"
"On", vastasi hän vakavasti. "Hänellä oli viikset, mutta hän ei ollut
niin pitkä kuin te."
Minä pyysin, että hän antaisi minun miettiä asiaa. Ei ole tavallista,
että tapaa ryöstettyjä haaremikaunottaria Kansallis-vapaamielisen
klubin terassin alapuolella. Tilanne oli todella pulmallinen. Katselin
ympärilleni. Viimeisten kymmenen minuutin aikana ei näyttänyt
tapahtuneen mitään. Kalpea nuorukainen, joka jo tullessani istui
viereisellä penkillä, istui siinä yhä vieläkin lukien likaista
vaaleanpunaista sanomalehteä. Kyyhkyset ja varpuset hyppelivät
hilpeästi ympärillämme. Rattaillaan, jotka näkyivät lehvistön läpi,
istuivat ajurit vaipuneina hajamieliseen toimettomuuteen.
"Ei."
"Carlotta."
"Te ette voi olla niin hirveän julma", hän nyyhkytti, ja hän pyöritteli
"r"-äännettä niin sulosointuisesti kurkussaan, että hänen
syytöksensä tuntui kahta järkyttävämmältä. Hän käänsi onnettomat
silmänsä minuun.
"Minne?"
Minä jäin istumaan suu auki. Minne me ajaisimme? Minulta meni
pää pyörälle.
"Minkätähden?"
Miksi, oi miksi Judith oli matkustanut Pariisiin? Jos hän olisi ollut
kaupungissa, olisin voinut kyyditä Carlottan hänen luokseen ja
kevein sydämin ajaa kotiin päivällistäni syömään ja Dristoforo da
Costà'tani lukemaan. Judith olisi pitänyt Carlottaa sangen
huvittavana. Hän olisi pessyt tytön ruumiin ja tutkinut hänen
sieluaan. Mutta Judith on mennyt luostariin Delphine Carrèren luo ja
jättänyt minun niskoilleni olemassaolon vastuun — ja Carlottan.
"Noin te ette saa tehdä", selitin minä. "Ei, minä en ole ollenkaan
vihainen teille. Mutta toivon, että käsitätte, että tämä tapaus on
ainoa laatuaan."
Minä tunsin, että olin käyttäytynyt kuin sydämetön konna aina siitä
hetkestä asti, jolloin Waterloon asemalla viskasin hänet rattaisiin.
Kaduin ja aloin nauraa.
Hän sulki silmänsä. Näin nyt, että hän oli hyvin väsynyt. Ajattelin,
että hän oli nukahtanut, ja tuijotin eteeni syventyneenä probleemiini.
Äkkiä paiskattiin vaunujen ovi auki, ja ellen olisi pidättänyt häntä,
olisi hän hypännyt ulos ajopeleistä.
Baker Street aseman luona hän kysyi väsyneesti: "Onko teille pitkä
matka?"
"Hyvä."
Hän nukkui niin makeasti, lapsi rukka! Voi, miten väsynyt hän oli!
Hän oli syönyt vähän lientä, vähän kalaa ja munakkaan. Miten kaunis
hän oli, lempeä kuin lammas; ja hänen ihonsa — sitä luulisi silkiksi.
Eikö herra ollut huomannut sitä?
Täksi yöksi hänestä siis oli pidetty huoli. Minulta pääsi helpotuksen
huokaus. Huomenna salapoliisin piti ryhtyä hakemaan ilmoihin
haihtunutta Harrya. Hyvä oli, että Carlotta muisti hänen
sukunimensä — se teki etsiskelyn paljon helpommaksi. Sytytin
paperossin ja avasin sanomalehteni.
ebookmasss.com