100% found this document useful (22 votes)
133 views85 pages

Full OCA Java SE 7 Programmer I Certification Guide Prepare For The 1Z0 803 Exam 1st Edition Mala Gupta PDF All Chapters

Mala

Uploaded by

omaimasvs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (22 votes)
133 views85 pages

Full OCA Java SE 7 Programmer I Certification Guide Prepare For The 1Z0 803 Exam 1st Edition Mala Gupta PDF All Chapters

Mala

Uploaded by

omaimasvs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 85

Download the full version of the ebook at ebookfinal.

com

OCA Java SE 7 Programmer I Certification Guide


Prepare for the 1Z0 803 exam 1st Edition Mala
Gupta

https://ebookfinal.com/download/oca-java-se-7-programmer-i-
certification-guide-prepare-for-the-1z0-803-exam-1st-
edition-mala-gupta/

OR CLICK BUTTON

DOWNLOAD EBOOK

Download more ebook instantly today at https://ebookfinal.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

OCA OCP Java SE 7 Programmer I II Study Guide Exams 1Z0


803 1Z0 804 1st Edition Kathy Sierra

https://ebookfinal.com/download/oca-ocp-java-se-7-programmer-i-ii-
study-guide-exams-1z0-803-1z0-804-1st-edition-kathy-sierra/

ebookfinal.com

OCA Oracle Database 12c Administrator Certified Associate


Study Guide Exams 1Z0 061 and 1Z0 062 1st Edition Biju
Thomas
https://ebookfinal.com/download/oca-oracle-database-12c-administrator-
certified-associate-study-guide-exams-1z0-061-and-1z0-062-1st-edition-
biju-thomas/
ebookfinal.com

CCNP ROUTE 642 902 Official Certification Guide Exam


Certification Guide Wendell Odom

https://ebookfinal.com/download/ccnp-route-642-902-official-
certification-guide-exam-certification-guide-wendell-odom/

ebookfinal.com

CCNP SWITCH 642 813 Official Certification Guide Exam


Certification Guide 1st Edition David Hucaby

https://ebookfinal.com/download/ccnp-switch-642-813-official-
certification-guide-exam-certification-guide-1st-edition-david-hucaby/

ebookfinal.com
Java EE 6 Pocket Guide 1st Edition Arun Gupta

https://ebookfinal.com/download/java-ee-6-pocket-guide-1st-edition-
arun-gupta/

ebookfinal.com

CCNA ICND2 Official Exam Certification Guide Wendell Odom

https://ebookfinal.com/download/ccna-icnd2-official-exam-
certification-guide-wendell-odom/

ebookfinal.com

The PMP Certification Exam Study Guide Rosaldo De Jesus


Nocêra

https://ebookfinal.com/download/the-pmp-certification-exam-study-
guide-rosaldo-de-jesus-nocera/

ebookfinal.com

CCNP BCMSN Exam Certification Guide 2nd Edition David


Hucaby

https://ebookfinal.com/download/ccnp-bcmsn-exam-certification-
guide-2nd-edition-david-hucaby/

ebookfinal.com

Java 2 Certification Training Guide 2nd Edition Jamie


Jaworski

https://ebookfinal.com/download/java-2-certification-training-
guide-2nd-edition-jamie-jaworski/

ebookfinal.com
Prepare for the 1ZO-803 exam

Mala Gupta
FOREWORD BY Jeanne Boyarsky

MANNING

www.it-ebooks.info
OCA Java SE 7 Programmer I
Certification Guide

www.it-ebooks.info
www.it-ebooks.info
OCA Java SE 7
Programmer I
Certification Guide
PREPARE FOR THE 1Z0-803 EXAM

MALA GUPTA

MANNING
SHELTER ISLAND

www.it-ebooks.info
For online information and ordering of this and other Manning books, please visit
www.manning.com. The publisher offers discounts on this book when ordered in quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 261
Shelter Island, NY 11964
Email: [email protected]

©2013 by Manning Publications Co. All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in


any form or by means electronic, mechanical, photocopying, or otherwise, without prior written
permission of the publisher.

Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in the book, and Manning
Publications was aware of a trademark claim, the designations have been printed in initial caps
or all caps.

Recognizing the importance of preserving what has been written, it is Manning’s policy to have
the books we publish printed on acid-free paper, and we exert our best efforts to that end.
Recognizing also our responsibility to conserve the resources of our planet, Manning books
are printed on paper that is at least 15 percent recycled and processed without the use of
elemental chlorine.

Manning Publications Co. Development editor: Cynthia Kane


20 Baldwin Road Technical editor: Brent Watson
PO Box 261 Technical proofreader: Jeanne Boyarsky
Shelter Island, NY 11964 Copyeditors: Tara Walsh, Bob Herbstman,
Nancy Wolfe Kotary
Proofreader: Andy Carroll
Typesetter: Dennis Dalinnik
Illustrator: Martin Murtonen
Cover designer: Marija Tudor

ISBN: 9781617291043
Printed in the United States of America
1 2 3 4 5 6 7 8 9 10 – MAL – 19 18 17 16 15 14 13

www.it-ebooks.info
To my pillar of strength, my best friend,
and my husband, Dheeraj Prakash

www.it-ebooks.info
www.it-ebooks.info
brief contents
Introduction 1
1 ■ Java basics 13
2 ■ Working with Java data types 69
3 ■ Methods and encapsulation 110
4 ■ String, StringBuilder, Arrays, and ArrayList 174
5 ■ Flow control 243
6 ■ Working with inheritance 295
7 ■ Exception handling 348
8 ■ Full mock exam 405

vii

www.it-ebooks.info
www.it-ebooks.info
contents
foreword xvii
preface xix
acknowledgments xxi
about this book xxiii
about the author xxx
about the cover illustration xxxi

Introduction 1
1 Disclaimer 2
2 Introduction to OCA Java SE 7 Programmer
certification 2
The importance of OCA Java SE 7 Programmer certification 2
Comparing OCA Java exam versions 3 Comparing the OCA

Java SE 7 Programmer I (1Z0-803) and OCP Java SE 7


Programmer II (1Z0-804) exams 4 Complete exam objectives,

mapped to book chapters, and readiness checklist 4


3 FAQs 8
FAQs on exam preparation 8 ■
FAQs on taking the exam 10
4 The testing engine used in the exam 12

ix

www.it-ebooks.info
x CONTENTS

1 Java basics 13
1.1 The structure of a Java class and source code file
Structure of a Java class 15 ■ Structure and components of
14

a Java source code file 21


1.2 Executable Java applications 25
Executable Java classes versus nonexecutable Java classes 25
Main method 26
1.3 Java packages 29
The need for packages 29 Defining classes in a package

using the package statement 30 Using simple names with ■

import statements 32 Using packaged classes without using


the import statement 34 Importing a single member versus all


members of a package 35 Can you recursively import


subpackages? 35 Importing classes from the


default package 36 Static imports 36


1.4 Java access modifiers 37


Access modifiers 37 Public access modifier 39

Protected access modifier 40 Default access (package access)



42
Private access modifier 45
1.5 Nonaccess modifiers 47
Abstract modifier 48 ■
Final modifier 49 ■
Static modifier 51
1.6 Summary 54
1.7 Review notes 55
1.8 Sample exam questions 58
1.9 Answers to sample exam questions 62

2 Working with Java data types 69


2.1 Primitive variables 70
Category: Boolean 72 Category: Numeric 73

Category: Character 78 Confusion with the names


of the primitive data types 79


2.2 Identifiers 80
Valid and invalid identifiers 81
2.3 Object reference variables 82
What are object reference variables? 82 Differentiating between

object reference variables and primitive variables 84

www.it-ebooks.info
CONTENTS xi

2.4 Operators 85
Assignment operators 87 Arithmetic operators 89

Relational operators 92 Logical operators 94


Operator precedence 96
2.5 Summary 98
2.6 Review notes 98
2.7 Sample exam questions 101
2.8 Answers to sample exam questions 104

3 Methods and encapsulation 110


3.1 Scope of variables 112
Local variables 112 Method parameters 114

Instance variables 115 Class variables 116


Overlapping variable scopes 117


3.2 Object’s life cycle 120
An object is born 120 Object is accessible 122

Object is inaccessible 123


3.3 Create methods with arguments and return values 124
Return type of a method 125 ■
Method parameters 127
Return statement 130
3.4 Create an overloaded method 132
Argument list 133 ■
Return type 135 ■
Access modifier 135
3.5 Constructors of a class 136
User-defined constructors 137 ■
Default constructor 140
Overloaded constructors 142
3.6 Accessing object fields 145
What is an object field? 145 Read and write object fields

145
Calling methods on objects 148
3.7 Apply encapsulation principles to a class 150
Need for encapsulation 150 ■
Apply encapsulation 151
3.8 Passing objects and primitives to methods 153
Passing primitives to methods 153 ■
Passing object references
to methods 155
3.9 Summary 158
3.10 Review notes 158

www.it-ebooks.info
xii CONTENTS

3.11 Sample exam questions 162


3.12 Answers to sample exam questions 166

4 String, StringBuilder, Arrays, and ArrayList 174


4.1 Welcome to the world of the String class
Creating String objects 176 The class String is immutable

175
179
Methods of the class String 182 String objects

and operators 186 Determining equality of Strings 187


4.2 Mutable strings: StringBuilder 189


The StringBuilder class is mutable 190
Creating StringBuilder objects 190 Methods of class

StringBuilder 192 A quick note on the class StringBuffer



197
4.3 Arrays 197
What is an array? 197 Array declaration 199

Array allocation 200 Array initialization 201


Combining array declaration, allocation, and initialization 203


Asymmetrical multidimensional arrays 204 Arrays of type

interface, abstract class, and class Object 205 Members of ■

an array 206
4.4 ArrayList 206
Creating an ArrayList 207 Adding elements to

an ArrayList 209 Accessing elements of an ArrayList 211


Modifying the elements of an ArrayList 212 Deleting the ■

elements of an ArrayList 213 Other methods of ArrayList 215


4.5 Comparing objects for equality 221


The method equals in the class java.lang.Object 221
Comparing objects of a user-defined class 221 Incorrect method■

signature of the equals method 223 Contract of the


equals method 224


4.6 Summary 225
4.7 Review notes 227
4.8 Sample exam questions 232
4.9 Answers to sample exam questions 236

5 Flow control
5.1
243
The if and if-else constructs 245
The if construct and its flavors 245 Missing else blocks

248
Implications of the presence and absence of {} in

www.it-ebooks.info
CONTENTS xiii

if-else constructs 249 Appropriate versus inappropriate


expressions passed as arguments to an if statement 251


Nested if constructs 252
5.2 The switch statement 254
Create and use a switch statement 254 Comparing a switch ■

statement with multiple if-else constructs 254 Arguments passed ■

to a switch statement 257 Values passed to the label case of a


switch statement 258 Use of break statements within


a switch statement 259


5.3 The for loop 260
Initialization block 262 Termination condition

263
The update clause 263 Nested for loop 264

5.4 The enhanced for loop 265


Limitations of the enhanced for loop 268 ■
Nested enhanced
for loop 269
5.5 The while and do-while loops 270
The while loop 271 The do-while loop 272

While and do-while block, expression, and nesting rules 274


5.6 Comparing loop constructs 274
Comparing do-while and while loops 274 Comparing for and ■

enhanced for loops 275 Comparing for and while loops 276

5.7 Loop statements: break and continue 276


The break statement 276 ■ The continue statement 278
Labeled statements 279
5.8 Summary 280
5.9 Review notes 280
5.10 Sample exam questions 283
5.11 Answers to sample exam questions 287

6 Working with inheritance 295


6.1 Inheritance with classes 296
Need to inherit classes 296 A derived class contains within it an

object of its base class 300 Which base class members are inherited

by a derived class? 301 Which base class members aren’t


inherited by a derived class? 301 Derived classes can define


additional properties and behavior 301 Abstract base class


versus concrete base class 302

www.it-ebooks.info
xiv CONTENTS

6.2 Use interfaces 304


Properties of members of an Interface 307 Why a class can’t ■

extend multiple classes 308 Implementing multiple


interfaces 308
6.3 Reference variable and object types 310
Using a variable of the derived class to access its own object 311
Using a variable of the base class to access an object of
a derived class 312 Using a variable of an implemented interface

to access a derived class object 312 The need for ■

accessing an object using the variables of its base class or


implemented interfaces 313
6.4 Casting 316
How to cast a variable to another type 316
Need for casting 318
6.5 Use this and super to access objects and constructors 319
Object reference: this 319 ■ Object reference: super 321
6.6 Polymorphism 324
Polymorphism with classes 324 Binding of variables and

methods at compile time and runtime 329


Polymorphism with interfaces 330
6.7 Summary 333
6.8 Review notes 334
6.9 Sample exam questions 336
6.10 Answers to sample exam questions 340

7 Exception handling 348


7.1 Exceptions in Java 349
A taste of exceptions 349 Why handle

exceptions separately? 352 Do exceptions


offer any other benefits? 353


7.2 What happens when an exception is thrown? 354
Creating try-catch-finally blocks 356 Will a finally block execute

even if the catch block defines a return statement? 361


What happens if both a catch and a finally block define
return statements? 362 What happens if a finally block modifies

the value returned from a catch block? 363 Does the order of the ■

exceptions caught in the catch blocks matter? 364 Can I rethrow ■

an exception or the error I catch? 366 Can I declare my methods


to throw a checked exception, instead of handling it? 367

www.it-ebooks.info
CONTENTS xv

I can create nested loops, so can I create nested try-catch


blocks too? 367
7.3 Categories of exceptions 369
Identifying exception categories 369 Checked exceptions 370

Runtime exceptions (also known as unchecked exceptions) 371


Errors 372
7.4 Common exception classes and categories 374
ArrayIndexOutOfBoundsException and
IndexOutOfBoundsException 375 ClassCastException 376

IllegalArgumentException 378 IllegalStateException 378


NullPointerException 379 NumberFormatException 382


ExceptionInInitializerError 384 StackOverflowError 386


NoClassDefFoundError 386 OutOfMemoryError 387


7.5 Summary 387


7.6 Review notes 388
7.7 Sample exam questions 393
7.8 Answers to sample exam questions 397

8 Full mock exam 405


8.1 Mock exam 405
8.2 Answers to mock exam questions 439

appendix Answers to Twist in the Tale exercises 502


index 519

www.it-ebooks.info
www.it-ebooks.info
foreword
Taking the OCA Java Programmer I exam is a bit like taking a driving test. First you
learn the basics, like where the brakes are. Then you start driving, and then you get
ready to take the driving test to get your license. The written test includes things every-
one should know, things that you’ll never use after the road test, and some things that
are tricky edge cases. While the programmer exam cares about breaks more than
brakes, it certainly likes edge cases!
Consider Mala Gupta your driving instructor to get you ready for the programmer
exam. Mala points out what you’ll need to know when programming in the real
world—on your first job.
And consider this book your driver’s manual. It gives you the rules of the road of
Java, plus the gotchas that show up on that pesky written test. But don’t worry, it is
much more fun to read this book than the driver’s manual. Just like the driver’s man-
ual won’t teach you everything about driving, this book won’t teach you everything
there is to know about Java. If you haven’t yet, read an intro to a Java book first. Start
with a book like Head First Java or Thinking in Java and then come back to this book to
study for the exam.
As the technical proofreader of this book, I got to see it evolve and get better as
Mala worked on it. Through the conversations we had on little things, I learned that
Mala knows her stuff and is a great teacher of Java. While I’ve only technical proofread
a handful of books, I’ve posted reviews of over 150 technical books on Amazon, which
makes it easy to spot a book that isn’t clear or helpful. I’m happy to say that Mala’s
explanations are all very clear, and the pointers are great.

xvii

www.it-ebooks.info
xviii FOREWORD

I also got to read Mala’s posts in the certification forums at coderanch.com. She’s
been sharing updates about the exam as it comes out and posting fairly regularly for
over a year. As a senior moderator at coderanch.com, it is great to see an author sharing
her wisdom. It’s also nice to see the similarity in writing style between the forum posts
and the book. This shows the book is readable and written in an easy-to-understand,
casual style.
I particularly liked the diagrams, flow charts, and cartoons in this book. And, of
course, the annotated code examples I’ve come to expect from any Manning book.
Each chapter ends with sample mock exam questions and there is a full mock exam at
the end. This gives you good practice in getting ready for the exam. Wrong answers
are well explained so you don’t make the same mistakes over and over.
My favorite part of the book is the “Twist in the Tale” exercises. Mala gives a num-
ber of examples of how making a seemingly minor change to the code can have major
consequences. These exercises develop your attention to detail so you are more obser-
vant for the mock exam questions and the exam itself.
I had already passed the OCA Java Programmer exam with a score of 98% before
reading this book. If I hadn’t, the questions would have prepared me for the exam.
Studying from this book will give you the skills and confidence you need to become an
Oracle Certified Associate Java Programmer. Happy coding and good luck on the exam!

JEANNE BOYARSKY
SENIOR DEVELOPER & MODERATOR
CODERANCH

www.it-ebooks.info
preface
Java programmer certifications are designed to tell would-be employers whether you
really know your stuff, and cracking the OCA Java SE 7 Programmer Certification is
not an easy task. Thorough preparation is crucial if you want to pass the exam the first
time with a score that you can be proud of. You need to know Java inside and out, and
you need to understand the certification process so that you’re ready for the challeng-
ing questions you’ll face in the exam.
This book is a comprehensive guide to the 1Z0-803 exam. You’ll explore a wide
range of important Java topics as you systematically learn how to pass the certification
exam. Each chapter starts with a list of the exam objectives covered in that chapter.
Throughout the book you’ll find sample questions and exercises designed to rein-
force key concepts and prepare you for what you’ll see in the real exam, along with
numerous tips, notes, and visual aids.
Unlike many other exam guides, this book provides multiple ways to digest impor-
tant techniques and concepts, including comic conversations, analogies, pictorial rep-
resentations, flowcharts, UML diagrams, and, naturally, lots of well-commented code.
The book also gives insight into typical exam question mistakes and guides you in
avoiding traps and pitfalls. It provides
■ 100% coverage of exam topics, all mapped to chapter and section numbers
■ Hands-on coding exercises, including particularly challenging ones that throw
in a twist

xix

www.it-ebooks.info
xx PREFACE

■ Instruction on what’s happening behind the scenes using the actual code from
the Java API source
■ Mastery of both the concepts and the exam
This book is written for developers with a working knowledge of Java. My hope is that
the book will deepen your knowledge, prepare you well for the exam, and that you
will pass it with flying colors!

www.it-ebooks.info
acknowledgments
First and foremost, I thank Dheeraj Prakash—my pillar of strength, my best friend
and my husband. This book wouldn’t exist without his efforts. His constant guidance,
encouragement, and love kept me going. He helped me to get started with this book
and got me over the goal line.
My sincere gratitude to Marjan Bace, publisher at Manning, for giving me the oppor-
tunity to author this book. The Manning team has been wonderful—Scott Meyers
ensured that it was worth it for Manning to have a book on this subject. Cynthia Kane,
my development editor, played a major role in shaping the organization of individual
chapters and the overall book. It has been a real pleasure to work with her. Copyeditors
Tara Walsh, Bob Herbstman, and Nancy Wolfe Kotary not only applied their magic to
sentence and language constructions but also supplemented their editing with valuable
suggestions on technical content.
Technical Editor Brent Watson did a brilliant job of reviewing the complete book con-
tents in a limited time, catching even the smallest errors in the book. Technical Proof-
reader Jeanne Boyarsky was outstanding and an amazing person to work with. She was
very quick at reviewing the book, with an eye for detail. Proofreader Andy Carroll was
extremely capable and talented. He reviewed the final manuscript with great precision.
The technical reviewers on this book did an awesome job of reviewing the con-
tents and sharing their valuable feedback and comments: Roel De Nijs, Ivan Todorovic,
Michael Piscatello, Javier Valverde, Anayonkar Shivalkar, Kyle Smith, Niklas Rosencrantz,
Ashwin Mhatre, Janki Shah, Dmitriy Andrushko, Nitesh Nandwana, and Priyanka
Manchanda. I would also like to thank Ozren Harlovic, Review Editor, for managing

xxi

www.it-ebooks.info
xxii ACKNOWLEDGMENTS

the whole review process and meticulously funneling the feedback to make this
book better.
Martin Murtonen did an outstanding job of converting the black and white hand-
drawn illustrations into glorious images. It was amazing to scrutinize the page proofs. I
thank Dennis Dalinnik for adjusting the images in the final page proofs, which was a
lot of work. Janet Vail and Mary Piergies were awesome in their expertise at turning all
text, code, and images into publishable form. I am also grateful to Candace Gillhoolley
and Nermina Miller for their efforts in promoting the book.
I thank the MEAP readers for buying the book while it was being developed and for
their suggestions, corrections, and encouragement: Samuel Prette, David C., Diego
Poggioli, Baptize, Jayagopi Jagadeesan, David Vonka, Joel Rainey, Steve Breese, and
Jörgen Persson.
I would also like to thank my former colleagues Harry Mantheakis, Paul Rosenthal,
and Selvan Rajan, whose names I use in coding examples throughout the book. I have
always looked up to them.
I thank my nine-year-old daughter, Shreya, an artist, who often advised me on the
images that I created for the book. I’m also grateful to my younger daughter, Pavni,
who patiently waited for my attention all these months when my focus was on the
book. I thank my family for their unconditional support. The book would have been
not been possible without their love and encouragement.

www.it-ebooks.info
about this book
This book is written for developers with a working knowledge of Java who want to earn
the OCA Java SE 7 Programmer certification. It uses powerful tools and features to
make reaching your goal of certification a quick, smooth, and enjoyable experience.
This section will explain the features used in the book and tell you how to use the
book to get the most out of it as you prepare for the certification exam. More informa-
tion on the exam and on how the book is organized is available in the Introduction.

Start your preparation with the chapter-based exam


objective map
I strongly recommend a structured approach to preparing for this exam. To help you
with this task, I’ve developed a chapter-based exam objective map, as shown in figure 1.
The full version is in the Introduction (table I.3).

Figure 1 The Introduction to this book provides a list of all exam objectives and the corresponding
chapter and section numbers where they are covered. See the full table in the Introduction (table I.3).

xxiii

www.it-ebooks.info
xxiv ABOUT THIS BOOK

As you go through your preparation, mark your readiness score for each section. Self-
assessment is an important tool that will help you determine when you are ready to
take the exam.
The map in the Introduction shows the complete exam objective list mapped to
the relevant chapter and section numbers. You can jump to the relevant section num-
ber to work on a particular exam topic.

Chapter-based objectives
Each chapter starts with a list of the exam objectives covered in that chapter, as shown
in figure 2. This list is followed by a quick comparison of the major concepts and top-
ics covered in the chapter with real-world objects and scenarios.

Figure 2 An example of the list of exam objectives and brief explanations at the beginning of
each chapter

Section-based objectives
Each main section in a chapter starts by identifying the exam objective(s) that it cov-
ers. Each listed exam topic starts with the exam objective and its subobjective number.
In figure 3, the number 4.4 refers to section 4.4 in chapter 4 (the complete list of
chapters and sections can be found in the table of contents). The 4.3 preceding the
exam objective refers to the objective’s numbering in the list of exam objectives on
Oracle’s website (the complete numbered list of exam objectives is given in table I.3 in
the Introduction).

Figure 3 An example of the beginning of a section, identifying the exam objective that it covers

Exam tips
Each chapter provides multiple exam tips to re-emphasize the points that are the most
confusing, overlooked, or frequently answered incorrectly by candidates and that
therefore require special attention for the exam. Figure 4 shows an example.

www.it-ebooks.info
ABOUT THIS BOOK xxv

Figure 4 Example of an exam tip; they occur multiple times in a chapter

Notes
All chapters also include multiple notes, which draw your attention to points that
should be noted while you’re preparing for the exam. Figure 5 shows an example.

Figure 5 Example note

Sidebars
Sidebars contain information that may not be directly relevant to the exam but that is
related to it. Figure 6 shows an example.

Figure 6 Example sidebar

Images
I’ve used a lot of images in the chapters for an immersive learning experience. I
believe that a simple image can help you understand a concept quickly, and a little
humor can help you to retain information longer.
Simple images are used to draw your attention to a particular line of code (as
shown in figure 7).

www.it-ebooks.info
xxvi ABOUT THIS BOOK

public String replace(char oldChar, char newChar) {


if (oldChar != newChar) {
// code to create a new char array and
// replace the desired char with the new char

return new String(0, len, buf);


}
return this; replace creates and
} returns a new String
object. It doesn’t modify
the existing array value.

Figure 7 An example image that draws your attention to a particular line of code

I’ve used pictorial representation of data in arrays (figure 8) and other data types to
aid visualization and understanding.

A
0 0
B
multiStrArr 1 1
null
2
Jan
0
Feb
1
Mar Figure 8 An example pictorial
2
representation of data in an array

To reinforce important points and help you retain them longer, a little humor has
been added using comic strips (as in figure 9).

Figure 9 An example of a little humor to help you remember that the finally block
always executes

I’ve also used images to group and represent information for quick reference. Fig-
ure 10 shows an example of the protected members that can be accessed by derived

www.it-ebooks.info
ABOUT THIS BOOK xxvii

or unrelated classes in the same or separate packages. I strongly recommend that


you try to create a few of your own figures like these.

Same package Separate package

Derived classes

Unrelated classes Figure 10 An example of grouping and


representing information for quick reference

An image can also add more meaning to a sequence of steps also explained in the
text. For example, figure 11 seems to bring the Java compiler to life by allowing it to
talk with you and convey what it does when it gets to compile a class that doesn’t
define a constructor. Again, try a few of your own! It’ll be fun!

Poor class
Employee doesn’t
have a constructor.
Let me create
class Employee { one for it.
String name; class Employee {
int age; String name;
In
} int age;
Employee() {
Java
super();
compiler Default
name = null;
constructor
Out age = 0;
}
}

Figure 11 An example pictorial representation of steps executed by the Java compiler


when it compiles a class without a constructor

The exam requires that you know multiple methods from classes such as String,
StringBuilder, ArrayList, and others. The number of these methods can be over-
whelming, but grouping these methods according to their functionality can make this
task a lot more manageable. Figure 12 shows an example of an image that groups
methods of the String class according to their functionality.

String methods

Query position of chars Seem to modify String Others

charAt indexOf substring trim replace length startsWith endsWith

Figure 12 An example image used to group methods of the String class according to their
functionality.

www.it-ebooks.info
xxviii ABOUT THIS BOOK

Expressions that involve multiple operands can be hard to comprehend. Figure 13 is


an example of an image that can save you from the mayhem of unary increment and
decrement operators used in prefix and postfix notation.

Value of a increments to 11 due Value of a decrements to 10 due to


to postfix ++ used prior to this. postfix -- used prior to this.

a = a++ + a + a-- - a-- + ++a;

Value of a will increment after The value of a decrements to 9


this current value is used. due to a-- here, but again
Since this is again a postfix notation increments to 10 due to ++a.
value 11 is used before the decrement.

Figure 13 Example of values taken by the operands during execution of an expression

Code snippets that define multiple points and that may result in the nonlinear execu-
tion of code can be very difficult to comprehend. These may include selection state-
ments, loops, or exception-handling code. Figure 14 is an example of an image that
clearly outlines the lines of code that will execute.

1> RiverRafting riverRafting = new RiverRafting(); 1. Execute code on line 3.


2> try {
3> riverRafting.crossRapid(11); Code on line 4 and 5 won't
4> riverRafting.rowRaft("happy"); execute if line 3 throws an
5> System.out.println("Enjoy River Rafting"); exception.
6> }
7> catch (FallingRiverException e1) { 2. Combat exception thrown by
8> System.out.println("Get back in the raft"); code on line 3. Execute exception
9> } handler for
10> catch (DropOarException e2) { FallInRiverException.
11> System.out.println("Do not panic");
12> } 3. finally block always
13> finally { executes, whether line 3 throws any
14> System.out.println("Pay for the sport"); exception or not.
15> }
16> System.out.println("After the try block"); 4. Control transfers to the
statement following the
try-catch-finally block.

Figure 14 An example of flow of control in a code snippet that may define multiple points of
nonlinear execution of code

Twist in the Tale exercises


Each chapter includes a few Twist in the Tale exercises. For these exercises, I’ve tried
to use modified code from the examples already covered in a chapter, and the “Twist
in the Tale” title refers to modified or tweaked code. These exercises highlight how

www.it-ebooks.info
ABOUT THIS BOOK xxix

even small code modifications can change the behavior of your code. They should
encourage you to carefully examine all of the code in the exam.
My main reason for including these exercises is that on the real exam, you may get to
answer more than one question that seems to define exactly the same question and answer
options. But upon closer inspection, you’ll realize that these questions differ slightly, and
that these differences change the behavior of the code and the correct answer option.
The answers to all of the Twist in the Tale exercises are given in the appendix.

Code Indentation
Some of the examples in this book show incorrect indentation of code. This has been
done on purpose because on the real exam you can't expect to see perfectly indented
code. You should be able to comprehend incorrectly indented code to answer an
exam question correctly.

Review notes
When you’re ready to take your exam, don’t forget to reread the review notes a day
before or on the morning of the exam. These notes contain important points from
each chapter as a quick refresher.

Exam questions
Each chapter concludes with a set of 10 to 11 exam questions. These follow the same pat-
tern as the real exam questions. Attempt these exam questions after completing a chapter.

Answers to exam questions


The answers to all exam questions provide detailed explanations, including why options
are correct or incorrect. Mark your incorrect answers and identify the sections that
you need to reread. If possible, draw a few diagrams—you’ll be amazed at how much
they can help you retain the concepts. Give it a try—it’ll be fun!

Author Online
The purchase of OCA Java SE 7 Programmer I Certification Guide includes free access to a pri-
vate forum run by Manning Publications where you can make comments about the book,
ask technical questions, and receive help from the author and other users. You can access
and subscribe to the forum at www.manning.com/OCAJavaSE7ProgrammerICertification-
Guide. This page provides information on how to get on the forum once you’re registered,
what kind of help is available, and the rules of conduct in the forum.
Manning’s commitment to our readers is to provide a venue where a meaningful
dialogue among individual readers and between readers and the author can take
place. It’s not a commitment to any specific amount of participation on the part of the
authors, whose contribution to the book’s forum remains voluntary (and unpaid). We
suggest you try asking the author some challenging questions, lest her interest stray!
The Author Online forum and the archives of previous discussions will be accessi-
ble from the publisher’s website as long as the book is in print.

www.it-ebooks.info
about the author
Mala Gupta has a Master’s degree in Computer Applications (MCA). She is an Oracle
Certified Associate-Java SE 7 Programmer, Java Sun Certified Web Component Devel-
oper (SCWCD), and Sun Certified Java 2 Programmer (SCJP).
She has more than 12 years of experience in software design and development and
training. Her work experience is in Java technologies, primarily as an analyst, pro-
grammer, and mentor.
Mala has worked with international training and software services organizations in
Europe and development centers in India on various Java-based portals and web appli-
cations. She has experience in mentoring and ramping up teams’ technical and pro-
cess skills.
She is the founder and lead mentor of a portal (http://ejavaguru.com) that has
offered an online Java course in Java Programmer certification since 2006.

xxx

www.it-ebooks.info
about the cover illustration
The figure on the cover of the OCA Java SE 7 Programmer I Certification Guide is captioned
a “Morlach.” This illustration is taken from a recent reprint of Balthasar Hacquet’s
Images and Descriptions of Southwestern and Eastern Wenda, Illyrians, and Slavs published
by the Ethnographic Museum in Split, Croatia, in 2008. Hacquet (1739–1815) was an
Austrian physician and scientist who spent many years studying the botany, geology,
and ethnography of many parts of the Austrian Empire, as well as the Veneto, the
Julian Alps, and the western Balkans, inhabited in the past by peoples of many differ-
ent tribes and nationalities. Hand-drawn illustrations accompany the many scientific
papers and books that Hacquet published.
Morlachs were a rural population that lived in the Dinaric Alps in the western Bal-
kans hundreds of years ago. Many of them were shepherds who migrated in search of
better pastures for their flocks, alternating between the mountains in the summer and
the seashore in the winter. They were also called “Vlachs” in Serbian and Croatian.
The rich diversity of the drawings in Hacquet’s publications speaks vividly of
the uniqueness and individuality of Alpine and Balkan regions just 200 years ago. This
was a time when the dress codes of two villages separated by a few miles identified peo-
ple uniquely as belonging to one or the other, and when members of an ethnic
tribe, social class, or trade could be easily distinguished by what they were wearing.
Dress codes have changed since then and the diversity by region, so rich at the
time, has faded away. It is now often hard to tell the inhabitant of one continent from
another and the residents of the picturesque towns and villages in the Balkans are not
readily distinguishable from people who live in other parts of the world.

xxxi

www.it-ebooks.info
xxxii ABOUT THE COVER ILLUSTRATION

We at Manning celebrate the inventiveness, the initiative, and the fun of the com-
puter business with book covers based on costumes from two centuries ago brought
back to life by illustrations such as this one.

www.it-ebooks.info
Introduction

This introduction covers


■ Introduction to the Oracle Certified Associate (OCA)
Java SE 7 Programmer certification (exam number 1Z0-803)
■ Importance of OCA Java SE 7 Programmer certification
■ Comparison of the OCA Java SE 7 Programmer I exam with
OCA Java SE 5/6 exam
■ Comparison of the OCA Java SE 7 Programmer I exam
(1Z0-803) with OCP Java SE 7 Programmer II exam
(1Z0-804)
■ Detailed exam objectives, mapped to book chapters
■ Readiness checklist to determine your readiness level for
writing the exam
■ FAQ on exam preparation and on taking the exam
■ Introduction to the testing engine used for the exam

This book is intended specifically for individuals who wish to earn the Oracle Certi-
fied Associate (OCA) Java SE 7 Programmer certification (exam number 1Z0-803). It
assumes that you are familiar with Java and have some experience working with it.

www.it-ebooks.info
2 Introduction

If you are completely new to Java or to object-oriented languages, I suggest that you
start your journey with an entry-level book and then come back to this one.

1 Disclaimer
The information in this chapter is sourced from Oracle.com, public websites, and user
forums. Input has been taken from real people who have earned Java certification,
including the author. All efforts have been made to maintain the accuracy of the con-
tent, but the details of the exam—including the exam objectives, pricing, exam pass
score, total number of questions, maximum exam duration, and others—are subject
to change per Oracle’s policies. The author and publisher of the book shall not be
held responsible for any loss or damage accrued due to any information contained in
this book or due to any direct or indirect use of this information.

2 Introduction to OCA Java SE 7 Programmer


certification
The Oracle Certified Associate (OCA) Java SE 7 Programmer I exam (1Z0-803) covers
the fundamentals of Java SE 7 programming, such as the importance of object-
oriented programming, its implementation in code, and using flow control, arrays,
and other constructs.
This exam is the first of the two steps in earning the title of Oracle Certified Profes-
sional (OCP) Java SE 7 Programmer. It certifies that an individual possesses a strong
foundation in the Java programming language. Table 1 lists the details of this exam.

Table 1 Details for OCA Java SE 7 Programmer I exam (1Z0-803)

Exam number 1Z0-803

Java version Based on Java version 7

Number of questions 90

Passing score 77%

Time duration 140 minutes

Pricing US$300

Type of questions Multiple-choice questions

2.1 The importance of OCA Java SE 7 Programmer certification


The OCA Java SE 7 Programmer I exam (1Z0-803) is an entry-level exam in your Java
certification roadmap, as shown in figure 1. This exam is a prerequisite for the OCP
Java SE 7 Programmer II exam (1Z0-804), which is itself a prerequisite for most of the
other Oracle certifications in Java. The dashed lines and arrows in figure 1 depict
the prerequisites for a certification.
As shown in figure 1, the Java certification tracks are offered under the categories
Associate, Professional, Expert, and Master.

www.it-ebooks.info
Introduction 3

Associate Professional Expert Master

Java SE 7 Java SE 7
Java SE 6 Java SE
Developer
Java SE 5/6 Java SE 6/5

Exam Java EE 5 Web Java EE 6 Web Java EE 5


covered by Component Component Enterprise
book Developer Developer Architect

Java EE 5 Java EE 6
Business Enterprise
Component JavaBeans
Developer Developer
Java EE
Java EE 5 Web Java EE 6 Web
Services Services
Developer Developer

Java EE 6 Java
Persistence API
Developer

Java ME Mobile
Application
Developer Java ME

Increasing difficulty level

Figure 1 OCA Java SE 7 Programmer certification is the entry-level certification in the Java certification
roadmap. It’s a prerequisite for the OCP Java SE 7 Programmer II exam (1Z0-804), which is a prerequisite
for most of the other certifications in Java.

2.2 Comparing OCA Java exam versions


This section will clear up any confusion surrounding the different versions of the OCA
Java exam. As of now, Oracle offers two versions of the OCA certification in Java:
■ OCA Java SE 7 Programmer I (exam number: 1Z0-803)
■ OCA Java SE 5/SE 6 (exam number: 1Z0-850)

These two exam versions are quite different as far target audience, total number of
questions, passing score, and exam duration are concerned, as listed in table 2.

www.it-ebooks.info
4 Introduction

Table 2 Comparing exams: OCA Java SE 7 Programmer I and OCA Java SE 5/6

OCA Java SE 7 Programmer I (1Z0-803) OCA Java SE 5/SE 6 (1Z0-850)

Target audience Java programmers Java programmers and IT managers

Java version Based on Java version 7 Based on Java version 5/6

Total number of 90 51
questions

Exam duration 140 minutes 115 minutes

Passing score 77% 68%

Pricing US$300 US$300

Figure 2 shows a detailed comparison of the exam objectives of OCA Java SE 5/6 (1Z0-
850) and OCA Java SE 7 Programmer I (1Z0-803). It shows objectives that are exclusive
to each of these exam versions and those that are common to both. The first column
shows the objectives that are included only in OCA Java SE 5/6 (1Z0-850), the middle
column shows common exam objectives, and the right column shows exam objectives
covered only in OCA Java SE 7 Programmer I (1Z0-803).

2.3 Comparing the OCA Java SE 7 Programmer I (1Z0-803) and OCP


Java SE 7 Programmer II (1Z0-804) exams
The confusion between these two exams is due to the similarity in their names, but
these are two separate exams. Starting with Java 7, Oracle has raised the bar to earn
the title of Oracle Certified Professional Java SE 7 Programmer, which now requires
successfully completing the following two exams:
■ OCA Java SE 7 Programmer I (exam number: 1Z0-803)
■ OCP Java SE 7 Programmer II (exam number: 1Z0-804)
The OCP Java SE 7 Programmer certification is designed for individuals who possess
advanced skills in the Java programming language. This certification covers compara-
tively advanced Java features, such as threads, concurrency, Java file I/O, inner classes,
localization, and others.

2.4 Complete exam objectives, mapped to book chapters, and


readiness checklist
Table 3 includes a complete list of exam objectives for the OCA Java SE 7 Programmer
I exam, which was taken from Oracle’s website. All the objectives are mapped to the
book’s chapters and the section numbers that cover them. You can also check your
readiness to take the exam by selecting the appropriate stars. Here’s the legend:
! Basic knowledge
!! Intermediate (you can use it in code)
!!! Advanced (you can answer all questions about it)

www.it-ebooks.info
Introduction to OCA Java SE 7 Programmer certification 5

OCA Java SE 5/6 Common objectives OCA Java SE 7 Programmer I


1Z0-850 1Z0-803

Algorithm design and Java basics


implementation • Variable scope
• Algorithm • Structure of Java class
• Pseudocode
• import and package statements
• main method

Working with Java data types


• Enums • Primitives, object references • StringBuilder
• Read/write to object fields
• Call methods on objects
• Strings
Java development fundamentals Operators and decision constructs
• Use of javac command • Java operators • Parentheses to override
• Use of java command • if and if-else constructs operator precedence
• Purpose and type of classes • switch statement • Test equality between String and
in packages other objects using== and equals()
java.awt
javax.swing
Creating and using arrays
java.io
java.net • One-dimensional arrays • ArrayList
java.util • Multidimensional arrays

Java platforms and Loop constructs


integration technologies
• for and enhanced for loops
• Compare and contrast • while and do-while loops
J2SE, J2ME, J2EE
• break and continue statements
• RMI
• JDBC, SQL, RDMS
• JNDI, messaging, and JMS Methods and encapsulation
Client technologies
• Create methods with arguments • Apply static keyword to methods
• HTML, JavaScript and return types and fields
• J2ME MIDlets • Apply access modifiers • Overloaded constructors and methods
• Applets • Effect on object references and primitives • Default and user-defined constructors
• Swing when they are passed to methods

Server technologies Inheritance


• EJB, servlets, JSP, JMS, SMTP, • Implement inheritance • Determine when casting is necessary
JAX-RBC, WebServices, JavaMail • Polymorphism • Use super and this to access objects
• Servlet and JSP for HTML • Differentiate between type of and constructors
• EJB session, entity, and a reference variable and object
message-driven beans • Use abstract classes and interfaces
• Web tier, business tier, EIS tier Handling exceptions
OOP concepts • Exceptions and errors
• UML diagrams • try-catch blocks
• Association • Use of exceptions
• Composition • Methods that throw exceptions
• Association navigation • Common exception classes and
categories

Figure 2 Comparing objectives of exams OCA Java SE 5/6 and OCA Java SE 7 Programmer I

www.it-ebooks.info
6 Introduction

Table 3 Exam objectives and subobjectives mapped to chapter and section numbers,
with readiness score

Exam objectives Covered in chapter/section Your readiness score

1 Java basics Chapters 1 and 3

1.1 Define the scope of variables Section 3.1 !!!

1.2 Define the structure of a Java class Section 1.1 !!!

1.3 Create executable Java applications with Section 1.2 !!!


a main method

1.4 Import other Java packages to make them Section 1.3 !!!
accessible in your code

2 Working with Java data types Chapters 2, 3, and 4

2.1 Declare and initialize variables Sections 2.1 and 2.3 !!!

2.2 Differentiate between object reference Sections 2.1 and 2.3 !!!
variables and primitive variables

2.3 Read or write to object fields Section 3.6 !!!

2.4 Explain an object’s life cycle Section 3.2 !!!

2.5 Call methods on objects Section 3.6 !!!

2.6 Manipulate data using the String- Section 4.2 !!!


Builder class and its methods

2.7 Create and manipulate strings Section 4.1 !!!

3 Using operators and decision constructs Chapters 2, 4, and 5

3.1 Use Java operators Section 2.4 !!!

3.2 Use parentheses to override operator Section 2.4 !!!


precedence

3.3 Test equality between strings and other Section 4.1 !!!
objects using == and equals()

3.4 Create if and if-else constructs Section 5.1 !!!

3.5 Use a switch statement Section 5.2 !!!

4 Creating and using arrays Chapter 4

4.1 Declare, instantiate, initialize, and use a Section 4.3 !!!


one-dimensional array

4.2 Declare, instantiate, initialize, and use a Section 4.3 !!!


multidimensional array

4.3 Declare and use an ArrayList Section 4.4 !!!

www.it-ebooks.info
Introduction to OCA Java SE 7 Programmer certification 7

Table 3 Exam objectives and subobjectives mapped to chapter and section numbers,
with readiness score (continued)

Exam objectives Covered in chapter/section Your readiness score

5 Using loop constructs Chapter 5

5.1 Create and use while loops Section 5.5 !!!

5.2 Create and use for loops, including the Sections 5.3 and 5.4 !!!
enhanced for loop

5.3 Create and use do-while loops Section 5.5 !!!

5.4 Compare loop constructs Section 5.6 !!!

5.5 Use break and continue Section 5.7 !!!

6 Working with methods and Chapters 1 and 3


encapsulation

6.1 Create methods with arguments and Section 3.3 !!!


return values

6.2 Apply the static keyword to methods Section 1.5 !!!


and fields

6.3 Create an overloaded method Section 3.4 !!!

6.4 Differentiate between default and user- Section 3.5 !!!


defined constructors

6.5 Create and overload constructors Section 3.5 !!!

6.6 Apply access modifiers Section 1.4 !!!

6.7 Apply encapsulation principles to a class Section 3.7 !!!

6.8 Determine the effect upon object refer- Section 3.8 !!!
ences and primitive values when they
are passed into methods that change
the values

7 Working with inheritance Chapters 1 and 6

7.1 Implement inheritance Section 6.1 !!!

7.2 Develop code that demonstrates the use Section 6.6 !!!
of polymorphism

7.3 Differentiate between the type of a refer- Section 6.3 !!!


ence and the type of an object

7.4 Determine when casting is necessary Section 6.4 !!!

7.5 Use super and this to access objects Section 6.5 !!!
and constructors

7.6 Use abstract classes and interfaces Sections 1.5, 6.2, and 6.6 !!!

www.it-ebooks.info
8 Introduction

Table 3 Exam objectives and subobjectives mapped to chapter and section numbers,
with readiness score (continued)

Exam objectives Covered in chapter/section Your readiness score

8 Handling exceptions Chapter 7

8.1 Differentiate among checked exceptions, Section 7.3 !!!


RuntimeExceptions, and Errors

8.2 Create a try-catch block and deter- Section 7.2 !!!


mine how exceptions alter normal pro-
gram flow

8.3 Describe what exceptions are used for in Section 7.1 !!!
Java

8.4 Invoke a method that throws an exception Section 7.2 !!!

8.5 Recognize common exception classes Section 7.4 !!!


and categories

When you are ready to take the exam, you should ideally be able to select three stars for
each item in the table. But let’s define a better way to evaluate your exam readiness.
Once you have marked all the stars in the previous chart, calculate your total points
using the following values:
! 1 point
!! 2 points
!!! 4 points
As the maximum number of points is 172 (43 objectives × 4), a score in the range of
150–172 is considered a good score.
You can download a PDF version of the form from the book’s web page at http://
manning.com/gupta/ if you wish to mark yourself more than once.

3 FAQs
You might be anxious when you start your exam preparation or even think about get-
ting certified. This section can help calm your nerves by answering frequently asked
questions on exam preparation and on writing the exam.

3.1 FAQs on exam preparation


This sections answers frequently asked questions on how to prepare for the exam,
including the best approach, study material, preparation duration, how to test self-
readiness, and more.
WILL THE EXAM DETAILS EVER CHANGE FOR THE OCA JAVA SE 7 PROGRAMMER I EXAM?
Oracle can change the exam details for a certification even after the certification is
made live. The changes can be to the exam objectives, pricing, exam duration, exam
questions, and other parts. In the past, Oracle has made similar changes to certification

www.it-ebooks.info
FAQs 9

exams. Such changes may not be major, but it is always advisable to check Oracle’s
website for the latest exam information when you start your exam preparation.
WHAT IS THE BEST WAY TO PREPARE FOR THIS EXAM?
At the time of writing this book, there weren’t many resources available to prepare for
this exam. Apart from this book, Oracle offers an online course on this exam.
Generally, candidates use a combination of resources, such as books, online study
materials, articles on the exam, free and paid mock exams, and training to prepare for
the exam. Different combinations work best for different people, and there is no one
perfect formula to prepare. Depending on whether training or self-study works best
for you, you can select the method that is most appropriate for you. Combine it with a
lot of code practice and mock exams.
HOW DO I KNOW WHEN I AM READY FOR THE EXAM?
You can be sure about your exam readiness by consistently getting a good score in the
mock exams. Generally, a score of 80% and above in approximately seven mock exams
(the more the better) attempted consecutively will assure you of a similar score in the
real exam. You can also test your exam readiness using table 3. This table contains exam
objectives and subobjectives with multiple stars representing different levels of expertise.
HOW MANY MOCK TESTS SHOULD I ATTEMPT BEFORE THE REAL EXAM?
Ideally, you should attempt at least 10 mock exams before you attempt the real exam.
The more the better!
I HAVE TWO YEARS’ EXPERIENCE WORKING WITH JAVA. DO I STILL NEED TO PREPARE FOR
THIS CERTIFICATION?
It is important to understand that there is a difference between the practical knowl-
edge of having worked with Java and the knowledge required to pass this certification
exam. The authors of the Java certification exams employ multiple tricks to test your
knowledge. Hence, you need a structured preparation and approach to succeed in
the certification exam.
WHAT IS THE IDEAL TIME REQUIRED TO PREPARE FOR THE EXAM?
The preparation time frame mainly depends on your experience with Java and the
amount of time that you can spend to prepare yourself. On average, you will require
approximately 150 hours of study over two or three months to prepare for this exam.
Again, the number of study hours required depends on individual learning curves
and backgrounds.
It’s important to be consistent with your exam preparation. You cannot study for a
month and then restart after, say, a gap of a month or more.
DOES THIS EXAM INCLUDE ANY UNSCORED QUESTIONS?
A few of the questions that you write in any Oracle exam may be marked unscored.
Oracle’s policy states that while writing an exam, you won’t be informed whether a
question will be scored. You may be surprised to learn that as many as 10 questions out
of the 90 questions in the OCA Java SE 7 Programmer I exam may be unscored. Even if
you answer a few questions incorrectly, you stand a chance of scoring 100%.

www.it-ebooks.info
10 Introduction

Oracle regularly updates its question bank for all its certification exams. These
unscored questions may be used for research and to evaluate new questions that can
be added to an exam.
CAN I START MY EXAM PREPARATION WITH THE MOCK EXAMS?
If you are quite comfortable with the Java language features, then yes, you can start your
exam preparation with the mock exams. This will also help you to understand the types
of questions to expect in the real certification exam. But if you have little or no experi-
ence working with Java, or if you are not quite comfortable with the language features of
Java, I don’t advise you to start with the mock exams. The exam authors often use a lot
of tricks to evaluate a candidate in the real certification exam. Starting your exam prepa-
ration with mock exams will only leave you confused about the Java concepts.
SHOULD I REALLY BOTHER GETTING CERTIFIED?
Yes, you should, for the simple reason that employers bother about the certification of
employees. Organizations prefer a certified Java developer over a noncertified Java
developer with similar IT skills and experience. The certification can also get you a
higher paycheck than uncertified peers with comparable skills.

3.2 FAQs on taking the exam


This section contains a list of frequently asked questions related to the exam registra-
tion, exam coupon, do’s and don’ts while taking the exam, and exam retakes.
WHERE AND HOW DO I WRITE THIS EXAM?
You can write this exam at an Oracle Testing Center or Pearson VUE Authorized Test-
ing Center. To sit for the exam, you must register for the exam and purchase an exam
voucher. The following options are available:
■ Register for the exam and pay Pearson VUE directly.
■ Purchase an exam voucher from Oracle and register at Pearson VUE to take
the exam.
■ Register at an Oracle Testing Center.
Look for the nearest testing centers in your area, register yourself, and schedule an
exam date and time. Most of the popular computer training institutes also have a testing
center on their premises. You can locate a Pearson VUE testing site at www.pearsonvue
.com/oracle/, which contains detailed information on locating testing centers and
scheduling or rescheduling an exam. At the time of registration, you’ll need to pro-
vide the following details along with your name, address, and contact numbers:
■ Exam title and number (OCA Java SE 7 Programmer I, 1Z0-803)
■ Any discount code that should be applied during registration
■ Oracle Testing ID/Candidate ID, if you have written any other Oracle/Sun cer-
tification exam
■ Your OPN Company ID (if your employer is in the Oracle Partner Network, you
can find out the company ID and use any available discounts on the exam fee)

www.it-ebooks.info
FAQs 11

HOW LONG IS THE EXAM COUPON VALID FOR?


Each exam coupon is printed with an expiry date. Beware of any discounted coupons
that come with an assurance that they can be used past the expiration date.
CAN I REFER TO NOTES OR BOOKS WHILE WRITING THIS EXAM?
You can’t refer to any books or notes while writing this exam. You are not allowed to carry
any blank paper for rough work or even your mobile phone inside the testing cubicle.
WHAT IS THE PURPOSE OF MARKING A QUESTION WHILE WRITING THE EXAM?
By marking a question, you can manage your time efficiently. Don’t spend a lot of
time on a single question. You can mark a difficult question to defer answering it while
writing your exam. The exam gives you an option to review answers to the marked
questions at the end of the exam. Also, navigating from one question to another using
the Back and Next buttons is usually time consuming. If you are unsure of an answer,
mark it and review it at the end.
CAN I WRITE DOWN THE EXAM QUESTIONS AND BRING THEM BACK WITH ME?
No. The exam centers no longer provide sheets of paper for the rough work that you
may need to do while taking the exam. The testing center will provide you with either
erasable or nonerasable boards. If you’re provided with a nonerasable board, you may
request another one if you need it.
Oracle is quite particular about certification candidates distributing or circulating
the memorized questions in any form. If Oracle finds out that this is happening, it
may cancel a candidate’s certificate, bar that candidate forever from writing any Ora-
cle certification, inform the employer, or take legal action.
WHAT HAPPENS IF I COMPLETE THE EXAM BEFORE OR AFTER THE TOTAL TIME?
If you complete the exam before the total exam time has elapsed, revise your answers
and click the Submit or Finish button. The screen will display your score within 10 sec-
onds of clicking the Submit button!
If you have not clicked the Submit button and you use up all the exam time, the
exam engine will no longer allow you to modify any of the exam answers and will pres-
ent the screen with the Submit button.
WILL I RECEIVE MY SCORE IMMEDIATELY AFTER THE EXAM?
Yes, you will. When you click the Submit button, the screen will show your total score.
It will also show what you scored on each objective. The testing center will also give
you hard copies of your certification score. The certificate itself will arrive via post
within six to eight weeks.
WHAT HAPPENS IF I FAIL? CAN I RETAKE THE EXAM?
It’s not the end of the world. Don’t worry if you fail. You can retake the exam after
14 days (and the world will not know it’s a retake).
However, you cannot retake a passed exam to improve your score. Also, you cannot
retake a beta exam.

www.it-ebooks.info
12 Introduction

4 The testing engine used in the exam


The user interface of the testing engine used for the certification exam is quite sim-
ple. (You could even call it primitive, compared to today’s web, desktop, and smart-
phone applications.)
Before you can start the exam, you will be required to accept the terms and condi-
tions of the Oracle Certification Candidate Agreement. Your computer screen will dis-
play all these conditions and give you an option to accept the conditions. You can
proceed with writing the exam only if you accept these conditions.
Here are the features of the testing engine used by Oracle:
■ Engine UI is divided into three sections—The UI of the testing engine is divided into
the following three segments:
– Static upper section—Displays question number, time remaining, and a check-
box to mark a question for review.
– Scrollable middle section—Displays the question text and the answer options.
– Static bottom section—Displays buttons to display the previous question, dis-
play the next question, end the exam, and review marked questions.
■ Each question is displayed on a separate screen—The exam engine displays one ques-
tion on the screen at a time. It does not display multiple questions on a single
screen, like a scrollable web page. All effort is made to display the complete
question and answer options without scrolling, or with little scrolling.
■ Code Exhibit button—Many questions include code. Such questions, together
with their answers, may require significant scrolling to be viewed. As this can be
quite inconvenient, such questions include a Code Exhibit button that displays
the code in a separate window.
■ Mark questions to be reviewed—The question screen displays a checkbox with the text
“Mark for review” at the top-left corner. A question can be marked using this
option. The marked questions can be quickly reviewed at the end of the exam.
■ Buttons to display the previous and next questions —The test includes buttons to
display the previous and next questions within the bottom section of the test-
ing engine.
■ Buttons to end the exam and review marked questions—The engine displays buttons
to end the exam and to review the marked questions in the bottom section of
the testing engine.
■ Remaining time—The engine displays the time remaining for the exam at the
top right of the screen.
■ Question number—Each question displays its serial number.
■ Correct number of answer options—Each question displays the correct number of
options that should be selected from multiple options.
On behalf of all at Manning Publications, I wish you good luck and hope that you
score very well on your exam.

www.it-ebooks.info
Java basics

Exam objectives covered in this chapter What you need to know

[1.2] Define the structure of a Java class. Structure of a Java class, with its components: pack-
age and import statements, class declarations, com-
ments, variables, and methods.
Difference between the components of a Java class
and that of a Java source code file.

[1.3] Create executable Java applications The right method signature for the main method to
with a main method. create an executable Java application.
The arguments that are passed to the main method.

[1.4] Import other Java packages to make Understand packages and import statements. Get the
them accessible in your code. right syntax and semantics to import classes from
packages and interfaces in your own classes.

[6.6] Apply access modifiers. Application of access modifiers (public,


protected, default, and private) to a class and
its members. Determine the accessibility of code with
these modifiers.

[7.6] Use abstract classes and inter- The implication of defining classes, interfaces, and
faces. methods as abstract entities.

[6.2] Apply the static keyword to meth- The implication of defining fields and methods as
ods and fields. static members.

Imagine you’ve set up a new IT organization that works with multiple developers.
To ensure a smooth and efficient workflow, you’ll define a structure for your orga-
nization and a set of departments with separate assigned responsibilities. These
departments will interact with each other whenever required. Also, depending on

13

www.it-ebooks.info
14 CHAPTER 1 Java basics

confidentiality requirements, your organization’s data will be available to employees


on an as-needed basis, or you may assign special privileges to only some employees of
the organization. This is an example of how organizations work with a well-defined
structure and a set of rules to deliver the best results.
Similarly, Java has organized its workflow. The organization’s structure and compo-
nents can be compared with Java’s class structure and components, and the organiza-
tion’s departments can be compared with Java packages. Restricting access to all data
in the organization can be compared to Java’s access modifiers. An organization’s spe-
cial privileges can be compared to nonaccess modifiers in Java.
In the OCA Java SE 7 Programmer I exam, you’ll be asked questions on the struc-
ture of a Java class, packages, importing classes, and applying access and nonaccess
modifiers. Given that information, this chapter will cover the following:
■ Understanding the structure and components of a Java class
■ Understanding executable Java applications
■ Understanding Java packages
■ Importing Java packages into your code
■ Applying access and nonaccess modifiers

1.1 The structure of a Java class and source code file

[1.2] Define the structure of a Java class

NOTE When you see a certification objective callout such as the preceding one,
it means that in this section, we’ll cover this objective. The same objective may
be covered in more than one section in this chapter or in other chapters.

This section covers the structure and components of both a Java source code file (.java
file) and a Java class (defined using the keyword class). It also covers the differences
between a Java source code file and a Java class.
First things first. Start your exam preparation with a clear understanding of what is
required from you in the certification exam. For example, try to answer the following
query from a certification aspirant: “I come across the term ‘class’ with different
meanings—class Person, the Java source code file—Person.java, and Java bytecode
stored in Person.class. Which of these structures is on the exam?” To answer this ques-
tion, take a look at figure 1.1, which includes the class Person, the files Person.java and
Person.class, and the relationship between them.
As you can see in figure 1.1, a person can be defined as a class Person. This class
should reside in a Java source code file (Person.java). Using this Java source code file,
the Java compiler (javac.exe on Windows or javac on Mac OS X/Linux/UNIX) gener-
ates bytecode (compiled code for the Java Virtual Machine) and stores it in Person.class.
The scope of this exam objective is limited to Java classes (class Person) and Java
source code files (Person.java).

www.it-ebooks.info
The structure of a Java class and source code file 15

fined as
De side
s in
Re
Person.java Person.class
In
class Person {
class Person {
String name;
String getName() { Java
return name; compiler
}
}

Out

A person Class Person Java source code file Java bytecode

Figure 1.1 Relationship between the class Person, the files Person.java and Person.class, and how
one transforms into another

1.1.1 Structure of a Java class


The OCA Java SE 7 Programmer I exam will question you on your understanding of
the structure and components of a Java class defined using the keyword class. A
class can define multiple components. All the Java components that you’ve heard of
can be defined within a Java class. Figure 1.2 defines the components and structure
of a Java class.
Here’s a quick list of the components of a class (the ones that are on this exam),
which we’ll discuss in detail in this section:
■ The package statement
■ The import statement
■ Comments
■ Class declarations and definitions
■ Variables
■ Methods
■ Constructors

Java class components

Package statement 1
Import statements 2
Comments 3a
Class declaration { 4
Variables 5
Comments 3b
Constructors 6
Methods 7
Nested classes
Not included in OCA Java SE 7
Nested interfaces Programmer I exam
Enum Figure 1.2 Components of
} a Java class

www.it-ebooks.info
16 CHAPTER 1 Java basics

PACKAGE STATEMENT
All Java classes are part of a package. A Java class can be explicitly defined in a named
package; otherwise it becomes part of a default package, which doesn’t have a name.
A package statement is used to explicitly define which package a class is in. If a class
includes a package statement, it must be the first statement in the class definition:
package certification;
The package statement
class Course { should be the first
The rest of the code
for class Course statement in a class
}

NOTE Packages are covered in detail in section 1.3 of this chapter.


The package statement cannot appear within a class declaration or after the class dec-
laration. The following code will fail to compile:
class Course {
The rest of the code for class Course
}
package certification; If you place the package statement after
the class definition, the code won’t compile

The following code will also fail to compile, because it places the package statement
within the class definition:
class Course { A package statement can’t be placed within the curly
package com.cert; braces that mark the start and end of a class definition
}

Also, if present, the package statement must appear exactly once in a class. The follow-
ing code won’t compile:
package com.cert; A class can’t define multiple
package com.exams; package statements
class Course {
}

IMPORT STATEMENT university certification


Classes and interfaces in the same package
AnnualExam ExamQuestion
can use each other without prefixing their
names with the package name. But to use a
class or an interface from another package, MultipleChoice
you must use its fully qualified name. Because
this can be tedious and can make your code Figure 1.3 UML representation of the
difficult to read, you can use the import relationship between class AnnualExam
and ExamQuestion
statement to use the simple name of a class
or interface in your code.
Let’s look at this using an example class, AnnualExam, which is defined in the pack-
age university. Class AnnualExam is associated with the class certification.Exam-
Question, as shown using the Unified Modeling Language (UML) in figure 1.3.

www.it-ebooks.info
The structure of a Java class and source code file 17

Here’s the code for class AnnualExam:


package university;
import certification.ExamQuestion;

class AnnualExam { Define a variable


ExamQuestion eq; of ExamQuestion
}

Note that the import statement follows the


package statement but precedes the class
declaration. What happens if the class
AnnualExam isn’t defined in a package? Will certification

there be any change in the code if the class AnnualExam ExamQuestion


AnnualExam and ExamQuestion are related,
as depicted in figure 1.4?
MultipleChoice
In this case, the class AnnualExam isn’t part
of an explicit package, but the class Exam-
Figure 1.4 A UML representation of the
Question is part of package certification. relationship between the unpackaged class
Here’s the code for class AnnualExam: AnnualExam and ExamQuestion

import certification.ExamQuestion;
class AnnualExam {
ExamQuestion eq; Define a variable
}
of ExamQuestion

As you can see in the previous example code, the class AnnualExam doesn’t define
the package statement, but it defines the import statement to import the class
certification.ExamQuestion.
If a package statement is present in a class, the import statement must follow the
package statement. It’s important to maintain the order of the occurrence of the package
and import statements. Reversing this order will result in your code failing to compile:
import certification.ExamQuestion;
package university; The code won’t compile because an
import statement can’t be placed
class AnnualExam {
before a package statement
ExamQuestion eq;
}

We’ll discuss import statements in detail in section 1.3 of this chapter.


COMMENTS
You can also add comments to your Java code. Comments can appear at multiple
places in a class. A comment can appear before and after a package statement, before
and after the class definition, before and within and after a method definition. Com-
ments come in two flavors: multiline comments and end-of-line comments.
Multiline comments span multiple lines of code. They start with /* and end with
*/. Here’s an example:

www.it-ebooks.info
Exploring the Variety of Random
Documents with Different Content
the sunshine of something that was greater than she, too great to
be retained in her bosom.
To sing.... But the house was asleep. She alone was awake. That
was delightful ... to be alone. She felt an irrepressible smile on her
lips. “I love him ...” she whispered it softly, but she felt as though in
these words she had sung all her songs.

Downstairs the side entrance creaked gently. Christopher had just


come home. He looked round and then stole into the office, into the
room where his father used to work in the master-builder’s life time.
Since Christopher had somehow managed to pass through the
technical school, that was his place. Worn out, he leaned his elbows
on the writing-table. His shirt was crushed and his face looked
crushed too.
Otto Füger came in to him, but he was unable to alter his
despairing attitude. Helplessly his mouth went sideways.
“What has happened?” asked the younger Füger.
Christopher looked up wearily. It was all the same to him who
questioned him and what he answered. At this moment he would
have confessed his misery even to Florian. He had to speak to
somebody ... it is a relief to speak.
The straight soft lips of Otto Füger’s mouth went wide apart. His
eyes became round. He had long suspected that Christopher
gambled. But what he had lost last night was more than he thought
possible. Too much.... He steadied his staring features. He wanted to
know all there was to know.
“Is that all the trouble?”
Christopher looked at him suspiciously. He expected reproaches.
That was what he wanted; that would have shamed him, appeased
him. It would have relieved him of the weight of responsibility. Otto
Füger felt that he had been tactless. He put on a serious, worried
expression.
“This is a misfortune. A great misfortune. If the late Mr. Ulwing
knew...!”
Yet, he could have said nothing more crushing. Christopher bent
his head.
“Don’t think ... I am not bad. I am only unlucky, damned unlucky.”
Young Füger walked up and down the room and seemed deep in
thought though he knew full well what he was going to say.
Christopher’s eyes followed his movements with painful attention.
“Help me,” he said hoarsely when silence became insufferable.
“Help me, for God’s sake; give me some advice.”
That was exactly what Otto Füger wanted. He looked round
cautiously, then stopped in front of his chief’s son.
“The name of Ulwing is good,” he whispered, “in Paternoster
Street they will lend on it whatever you want. What are letters of
exchange for? Of course, it’s wrong,” he added hastily, “but for
once....”
“In Paternoster Street, at the money changer’s?” Christopher
looked up a little. “And my simple signature is sufficient? How is it I
never thought of it! Shall I go there?”
When Otto Füger was left alone, he took his spectacles off,
breathed on them and while he wiped them kept them quite close to
his eyes. He sat down to the writing-table. Slowly he began to draw
on the blotter. First he drew flourishes which became by degrees the
letter U ... Ulwing & Co. These were the words he wrote finally and
he thought that he would be the Co. He would work, but no more in
the dark, no more for others, like Augustus Füger, for whom he felt
an intimate contempt. His father had the nature of an old-fashioned
servant, who grows old in the yoke, remains a beggar for ever and
works for another man’s pocket.
He effaced what he had written on the blotter and got up
respectfully from the table. John Hubert was crossing the room. The
head of the firm waved his hand amicably. Otto Füger wrinkled his
eyebrows. “What an old hand he has. The whole man is old. Won’t
last long.” And he looked after him with the slow, strangled hatred
that is only felt by the poor who have to sell their brains to enrich
the rich.
“He can’t last long. And the other?...” He started anew writing on
the pad. Ulwing & Co. He wrote it many times and erased it
carefully.
That afternoon Christopher brought Anne a small gold chain. He
bought Mamsell Tini a silver-plated statue of St. Anthony, gave
Florian some money and sent him to the circus. He was generous
and whistled happily.
At the money changers’ in Paternoster Street everybody bowed
respectfully when he mentioned that his name was Christopher
Ulwing. They never asked for any security, nor did they make any
enquiries. The pen trembled slightly between his fingers, but the
owl-faced little clerk who presented the bill of exchange never
noticed it.
Now he was going to pay all his debts. He began to count. How
much would there be left over? He owed money to two usurers in
King Street. He would take his watch out of pawn. He thought of the
suspicious old hag who waited for nightfall to open her door at the
bottom of the courtyard of a disreputable house. He had promised a
bracelet to a girl. Greater sums began to come to his mind. Many old
debts he had forgotten. He whistled no more. He tried to suppress
the unpleasant thoughts; they had no justification, for had he not
plenty of money in his pocket? Somehow he would manage to get
his house in order. As for cards, he would never touch them again.
Then he stared wearily into space; he felt irritated. He had lost all
faith in his own pledges. He had broken as many promises as he had
made. He must pledge his word to somebody else. Where was
Anne?
Anne stood outside near the stairs and, leaning against the
balustrade, looked into the porch. She did not change her attitude
when her brother stepped beside her.
“What are you doing here?” asked Christopher to attract her
attention. He needed her, he wanted to speak to her. Now, at once,
because later on he might not have the courage to do so.
“Anne....”
The young girl turned round, but her look strayed beyond him.
“Somebody has come, the front door bell rang.” At this moment
she lived her own life so intently that her heart could not hear the
silent cry for help of the other life.
Christopher stopped near her for a little while, then he gave a
short whistle. The moment when he had decided to open his heart
had passed. He was rather pleased that he had not tied himself with
embarrassing promises. He remained free.
Anne scarcely noticed when he left her. She leaned again over the
balustrade. The corners of her eyes and lips rose imperceptibly. Her
small face took on a strange expectant expression.
And on that day he for whom Anne had waited really came.
They sat in the sunshine room, stiff, in a polite circle, as if a hoop
were on the ground between them.
Thomas Illey had brought his sister with him. Christopher was also
there and Anne imagined that they must all necessarily notice her
panting breath, and the blood forever rising to her cheeks.
She began to observe herself carefully, but found her voice
natural, her movements regular, as if someone else acted for her.
She grew calm; the confused sounds in her head turned into words.
Thomas Illey’s voice became distinct from the others and reached
her like a touch.
It gave her a tremor. It attracted her irresistibly, she had to turn
her face to him. Illey’s eyes were shining and deep. Only for an
instant did he look so, then he seemed to make an effort and a
cloud of haughty reserve fell over the radiant warmth of his look,
concealing it from the rest of the world.
But Anne did not forget that look, when her father came up from
his office. Thomas Illey spoke to John Hubert only, who sat just as
solemnly on the thin-legged flowered chair as he did long ago
besides the Septemvir Bajmoczy in the drawing-room of Baroness
Geramb.
They spoke of the city. Of new railways. Steamers for the Danube.
Building. Politics.
Anne did not understand much of this. In the Ulwing family
national politics only meant a good or bad business year. They were
considered a means or an obstruction, whereas to Illey they seemed
interesting for their own sake.
His sparse, tense speech became voluble.
“In vain they trample on us, in vain they throttle us,” he said and
his expression became hard. “The great freedom of the nomads is
the ancestral home of my race. We sprang from that. It cannot be
forgotten....”
Anne looked at him intensely and while she listened distant
memories came slowly from the twilight of her mind. Grandfather
Jörg’s former shop, feverish men and the mysterious powerful voice
which, unintelligible, had once carried her soul for a cause she could
not understand. Now it seemed to her that Thomas Illey gave words
to the voice and that she began to understand events of her
childhood.
John Hubert too followed Illey’s word attentively and thought of
his father, Ulwing the builder. What he had done and felt for the
town, Illey felt for the country and would like to do for the whole
country. How was that possible?
He smiled soberly. “They are all the same, the Hungarian gentry.
Every one of them wants to save the whole country, yet if each of
them grappled with a small part of it, they would achieve more.” He
criticised his guest quietly within himself, yet listened to him with
pleasure, because his words roused confidence and his thoughts
could find support in the power of words.
“Do you really think it is possible that our economic life should
ever revive again?” John Hubert was now thinking of his business
only. He spoke of the price of timber, building material and labour
conditions.
Martha smiled absent-mindedly in the corner of the flowered
couch. Christopher interrupted nervously but his father did not heed
him.
Thomas Illey listened politely. Anne noticed that he glanced
towards the mantelpiece, at the clock under the glass globe.
Frightened, she followed his look. She had never yet seen the hand
run so mischievously fast. And she now had a foreboding of what
the hours were to be to her when she was without him.
She must say something to Illey before he went, something that
would bring him back again. She did not know that she got up, she
did not know that she went to the piano.
“Yes, sing something,” said Martha.
“Do sing!” cried Christopher, delighted to interrupt his father.
Anne glanced shyly at Illey. He looked imploringly. Their eyes met.
They were far from each other and yet the girl felt that she was
nearest to him and was going to say something to him, to him alone.
She did not know what. But under her hand Schubert’s music was
already rising from the piano.
“Greetings to thee, greetings to thee....”
Blood rose in a pale pink cloud to Anne’s temples. Her face
became radiantly beautiful, her pure youthful bosom rose and fell
like a pair of snowy, beating wings and her voice sounded clearly,
rapturously, like a deep, all-powerful passion. It expressed tears,
triumphant youth, the unconscious, glorious avowal of all her love.
Christopher looked at her in amazement. He had never heard his
sober, serious sister sing like that. All looked at Anne. Not one of
them understood what had happened, yet they felt a strange warm
light thrill through them.
“How beautiful she looks when she is singing!” thought Thomas
Illey.
People do not see each other always, only now and then for a
moment. Thomas Illey saw Anne in this moment. He turned a little
pale and felt as if a hot caressing hand fanned the air near his face.
He lost control over his eyes and passionately they took possession
of the girl.
Though Anne did not understand all that was in this look, it moved
her deeply.
Then the song came to an end. The following silence cooled
Anne’s soul. Her greenish blue eyes looked frigidly into the air, her
eyelids became immobile. When she turned to Illey her face was
reserved, impenetrable. She wanted to screen what she had shown
of herself, as if she were ashamed of it.
The others too assumed this ordinary expression. Everybody
returned to everyday soberness. Netti brought the lamp in. It was
evening.

Before the week was over Thomas Illey called again at the old
house. He came alone, Martha had gone into the country.
“To the mother of her fiancé,” said Illey. “It is an old engagement.
The wedding will be in autumn. Then that worry will be over too.”
He said no more about it. On the whole he spoke little. Nor did
Anne say much, but the silence between them was bright and
happy.
Tini’s knitting needles clattered rapidly underneath the lamp-
shade; and the expression of her long, stiff face was that of an
elderly person contemplating spring through the window.
Now and then Anne started, as if his look had called to her by
name. She smiled at Thomas over the embroidery screen, then bent
her head down again and the stones of her rings sparkled at regular
intervals as she drew the silk upwards.
John Hubert came up from the office. Mamsell Tini stuck her
knitting needles into the ball of wool. She got up. Her steps died
away in the corridor and John Hubert spoke again about business,
the town and building.
When this happened Anne began to hear the ticking of the clock.
If only once she could be alone with Thomas, she would go to the
clock, push its hand back and that would tell him all she dared not
express in words. But they were never alone. She could only speak
to him when she was singing.
Did he understand it? Did he like to hear it? She did not know.
Illey was different from everyone she had known hitherto. When
their eyes met in silence she felt herself quite near to him. When
they spoke to each other it seemed to her that they were far, far
apart and that their voices had to travel a great distance, the words
being dulled on the way.
Anne began to grow fond of silence which she could fill with the
warmth of her heart.
Summer passed away.
Thomas Illey came more and more frequently and stayed longer
and longer. John Hubert surrendered his evening stroll to remain in
his company. Tini produced the best china cups from the glass
cupboard when he was expected. Florian ran to open the door.
The days became shorter. Now and then Netti lit a fire in the
stove.
One evening Illey was even more taciturn than usual.
Tini dropped her ball of wool. While she bent down for it Thomas
turned suddenly to Anne and said in a very low whisper:
“I shall soon leave Pest. Give me a word that I can carry with me.”
Mamsell was now sitting up again, stiff and straight, on her chair
and her knitting needles knocked each other diligently.
Anne’s hand had slid down from the embroidery frame and her
eyes became dull as if all their lustre had melted away.
“You are going?” Her voice was very dim.
“What did you say?” asked Miss Tini, absent-mindedly. She stuck
one of the knitting needles sideways into the knot of her hair and
began to count the stitches.
Illey watched with silent despair the slow-moving lips of Mamsell
as he impatiently twirled the old seal ring round and round.
“I am going to Martha’s wedding. I have some other business too,
so who knows when I can come back again.”
Anne looked at the ring and then lifted her eyes to Thomas. She
would have liked to tell him, implore him, to take her with him too,
to abide faithfully by her as he clung to that ring and never leave her
alone again.
“Come to-morrow with Christopher to the Palatine’s Island,” said
Illey suddenly. His voice became harsh and commanding. “We shall
meet at the pier.” Then he continued, more softly: “Do sing
something....” He said this as if to clear the air of the grating
vibrations of his former words.
“You really want me to?” Anne’s eyes blazed up. The dominating
voice had made her feel as though Thomas had laid hands on her, as
though he had bent her wrist with tender force. That unconscious
delight of women in the humiliations of love flashed through her. She
blushed and asked:
“What do you like? Schubert, Mozart or Schumann?”
“The voice of Anne Ulwing,” answered Illey simply, looking straight
into her eyes.
When the song died away, Thomas rose.
“Au revoir,” said Anne, and her hand, like a little bird snuggling up
in its nest, took refuge in his strong, warm grip. They remained like
that for an instant. Then Anne was again alone. She ran back to the
piano.
Even now she was still singing for Thomas. She sent her voice
after him, to follow him down the stairs, to attend him part of the
way. Perhaps he would hear it and turn back.
She drew aside the muslin curtains of the window. Lamps were
already burning in the streets. Someone on the other side. Anne
leant eagerly forward.
It was Otto Füger.
For a short time the younger Füger remained standing there, and
turned his head in the direction whither Thomas Illey had gone.
From the office window a beam of light stretched to the street. In
what had once been the study of Ulwing the builder the green-
shaded lamps were lit up.
This evening John Hubert remained exceptionally long at his
writing desk. He sat there in a state of collapse and his colourless
skin formed two empty folds under his chin. His hand lay inert on a
bundle of papers which had been presented to him for signature.
He rose heavily. He was looking for the second time through the
door which led to the adjoining office. Once Augustus Füger used to
work there, but, since an attack of apoplexy had paralysed the little
book-keeper’s right arm, his son Otto occupied his place.
“Where can he be?” mused John Hubert, looking through the door
into the empty office.
He returned to his seat at the writing desk. His eyes gazed at the
plan of Pest-Buda, but he did not see anything of it. Every now and
then his head twitched, as if he sought to shake up behind his
forehead the dull, dense matter that refused to act. He sighed and
desisted from the effort. He shut his eyes. But now that he wanted
to rest, his brain became active and a whirling chaos moved about it.
He thought suddenly of Christopher.
Otto Füger entered quietly through the door. Cold rage was in his
eye and his lips were compressed and straight. But as soon as he
came within the light of the lamps he was already smiling.
John Hubert continued his reflections aloud:
“Somebody mentioned Christopher’s name to-day at the money-
changer’s. The clerk spoke of him behind the counter. When I turned
to them they caught their breath. I can’t understand it.” He looked
anxiously at young Füger. “Do you know anything?”
Otto Füger did not answer at once. At this moment he hated
furiously everybody living in that house. He hated the others
because of Anne and on account of that stuck-up Illey whose looks
always passed above his head. Now he had his chance to revenge
himself on them for having been born in the back-lodgings of an
insignificant book-keeper, for being poor and striving vainly. He
looked humbly to the ground and feigned to suffer from the painful
necessity of his disclosures.
“It is hard on me to have to betray Mr. Christopher. I have always
tried to restrain him, I have implored him....”
“What is going on behind my back?” John Hubert’s voice bubbled
out heavily between his blanched lips.
When the whole truth was revealed to him, he repeated painfully:
“He gambles ... the whole town knows it.... He loses ... bills of
exchange?...” He asked terrified: “What is the amount?”
“One hundred and eighty thousand florins....”
For an instant, John Hubert straightened himself in the chair, then
his body collapsed slowly to one side. His high collar alone kept his
relaxed, waxy face in position. In a few minutes he had turned quite
old.
Otto Füger watched his chief cunningly. He judged from his
altered attitude what was the right thing to say.
“We must not despair, sir. At bottom Mr. Christopher is a good,
God-fearing young gentleman. It is all the fault of bad company. I
always told him so. Those young gentry fellows from the country
preyed on him. They have got rich Ulwing’s money. But don’t punish
him, sir. I beg of you, let me bear your anger, for have I not sinned
more than he for keeping it quiet?”
He hung his head penitently, as if expecting judgment.
“You are a good fellow, Otto,” said John Hubert, deeply touched.
“We will save the reputation of the firm,” young Füger said
solemnly. “As for Mr. Christopher, if I may venture to give advice, we
shall have to tear him from the tempters. Perhaps abroad....”
“Send him abroad? Yes,” John Hubert became suddenly
determined. “That was once the plan of my late father. You advise
Frankfurt? All right, let it be Frankfurt.”
The book-keeper had not expected to get his way so easily. He
became more enterprising.
“He had better go among unpretentious working-class people, till
he settles down. Meanwhile you might like to choose for Miss Anne
some level-headed business man as a husband; he might enter the
firm as a partner and relieve your mind, sir, of all the worries.”
That was a new hope. John Hubert pulled his necktie up. “A
serious man of business to stand by Christopher. Somebody
belonging to the family. Anne’s husband....” Thomas Illey’s image
intruded unpleasantly on his memory. “We must prevent them from
meeting again.” Life had been so exacting to him that now he would
insist on getting his own back. He had always been merciless to
himself, now he would show no mercy to others.
“Yes, that would free me from all care,” he murmured as if taking
counsel with himself. “Anne’s husband.... But who is it to be?”
Otto Füger smiled modestly. He took his spectacles off, breathed
on them and wiped them while holding them up to his left eye.
John Hubert, for reasons unknown to him, thought of the son of
Martin George Münster. Charles Münster would bring capital into the
business, he had brains....
He clapped Otto Füger on the shoulder.
“Thank you!”
Young Füger looked after him dejected. He had expected
something else.
Next day Christopher left the old house. And at the pier of the
Danube Thomas Illey waited in vain for Anne.
White frost fell over the autumn roses in the garden.
CHAPTER XIV
Rain had collected in the gargoyle and gave off a hopeless gurgle as
if someone were sobbing under the steep double roof.
Out of doors the autumn evening fell sadly. On the window panes
of the sunshine room raindrops ran down like tears on a transparent
grey face.
Silence reigned in the deserted old nursery. Since Christopher’s
departure Anne had been very lonely. She would often rise from the
work table during the afternoon and go quietly to the door. She
opened it quickly, nobody was there. She looked down into the
depths of the staircase. The house was silent. She decided to count
up to a hundred, then wait no longer. Twice she counted up to a
hundred, and even after that she looked back from the threshold.
At night when Netti lit the lamp and Florian bolted the front door,
Anne’s eyes more than once filled with tears. She felt a prisoner. Life
remained outside the walls of her prison. Again a useless day had
drawn to an end, that at its dawning had promised so generously. It
tortured her artfully while it lasted, and in the end achieved nothing.
Thomas Illey came no more.
Anne’s little face became quite pale and thin. She began to be
afraid. Perhaps Illey went to someone else now, perhaps he was
angry? The last time he saw her he asked her so earnestly to go the
next day to the Danube pier. And she could not go, could send no
message, could not write. Christopher had to leave and their father
was very strict with both of them.
“Why does he not come? Where is he?”
She pressed her face against the window pane. Whenever the
front door bell rang the blood rushed to her heart. She waited, then
hung her head wearily.
In the sunshine room the furniture began to whisper. The walls
too remembered. The door handle was familiar with Thomas’s hand.
The shaded lamp, the clock under the glass globe, they all told her
that they had seen him many times.
Anne turned her face away. The memories wounded her. She
clasped her hands in prayer for respite from her tortures.
Hours passed. Tini came in and started to read her fortune with
cards. “All your sorrows will come to an end, my little dove,” she said
when she finished her game.
“I have no sorrows,” answered the girl and tried to hold her head
high.
John Hubert’s voice said:
“Anne, a visitor!”
Of late Charles Münster had often come to the house. In the
evening he sat comfortably in the green room, approving everything
John Hubert said, and when he could think of nothing to say, he
carelessly twirled the thumbs of his big, red hands.
Those hands annoyed Anne. They became embarrassed, blushed
like human faces, struggled, while Charles Münster remained placid
and tedious in his inordinately long Sunday coat.
“Why does he come?” wondered Anne wearily, while sitting
opposite him.
One day she learned that too; Charles Münster had asked her
father for her hand.
“It is a very honourable proposal and very advantageous,” said
John Hubert to his daughter. “The house of Münster has a good
reputation and is serious. The young man is intelligent and owns
some capital.”
Anne’s heart sank while she looked at him and then the blood
rushed to her face. All her life she had striven to repress her will;
she had always obeyed, but what she was now asked to do roused
her to rebellion.
“No, never!” And her voice rang out like a hammer dropping on
steel.
John Hubert was startled. That was the voice of Ulwing the
builder.
“I spoke too soon,” he thought, vexed. “I ought to have waited a
little longer.”
Then he waited. Outside the snow was falling already.
In the next few weeks Anne’s face became more and more
transparent. She did not sleep at night. She sang no longer, nor did
she laugh and during the long evenings she sat silent in the green
room, while her father worked at the writing table with the
innumerable drawers.
John Hubert had now to use spectacles for reading. He pushed
them up on his forehead and looked stealthily at Anne. Gradually he
became anxious. He thought of his own life. He had never been
happy, had never made anybody else happy.
“Are you ill?” he asked suddenly.
“No.”
“Have you any pain?”
Anne did not answer but her eyes asked him why he tortured her.
John Hubert bent down. He turned the pages of his ledger. Anne
heard him sigh anxiously.
“Have you had bad news from Christopher?” she asked, going to
the writing table. “No? Is it the business?... Speak to me about it, for
I too am an Ulwing.”
John Hubert closed the book in which he had been reckoning.
“You would not understand it.”
“But I could learn to....”
“You just go on embroidering, singing. You have no need to know
about business. It is not suitable for women. God has created you
for other ends.” But this sentence aroused his conscience. He
became embarrassed.
“You have not yet forgotten Thomas Illey?” he whispered casting
his eyes down.
“I have not forgotten him.”
A few days later Grandfather Jörg came in the evening to take
Anne to a concert. In the carriage the old gentleman began to
mention Charles Münster.
“Is he too like all the others?” the girl thought and looked sadly at
her grandfather. Once he had been to prison for sympathizing with
the freedom of others; and now he spoke against his grandchild’s
freedom.
In the concert hall the crowd was already large. Innumerable
candles burned in the gilt wooden chandelier. Their flames wove a
peaceful yellow light in the air. On the platform the piano stood
open. The orchestra was tuning up and this sounded like birds with
sharp beaks pecking at the stringed instruments.
A few reporters stood near the wall. Anne heard them agree in
advance as to what they would say in next day’s papers. In the stalls
well-known merchants from the inner town, wives of rich citizens,
officers in uniform, and right in front bejeweled ladies in huge
crinolines, noble gentlemen in Hungarian national costume.
The family of Müller the chemist nodded to them. The Münster
daughters were there too. In the back rows the newcomers moved
their chairs. Some laughed and cleared their throats, then suddenly,
as if moved by a common spring, all the heads turned towards the
platform. Then all became silent.
Anne glanced over the faces. The crowd seemed to her like an
empty vessel gaping towards the piano in expectation of being filled
with sounds and emotions. Her heart was full of her young distress
and she felt afraid that at the first sound her sufferings would
overflow through her eyes.
All of a sudden she became strangely restless, as if some one had
touched her from a distance. She turned her head quickly. The blood
throbbed in her veins as her look met the dark, sad eyes of Thomas
Illey. And the two glances united through space.
Waves surged between them. A wild tumult of cheers broke out.
The round of applause echoed like a thunderstorm from the walls.
The great artist stood on the platform, high above everybody. His
long white hair waved softly round his marble brow. He inclined his
wiry body before the homage.
Then the piano burst out under his hands. And the sounds sang,
crept, stormed furiously, coaxed voluptuously, and dissolved in a
smile. The artist with the marble brow conjured up harmonies from
the piano that had not existed before him and were not to be after
him.
The crowd listened with bated breath, spellbound. And the music
continued like a swelling tide. Then it became tender like a dying
echo. It broke forth again with superb impetuosity. Sounds wrought
in fire rose and those who heard them lived the creative moments of
Beethoven, Sebastian Bach and Weber over again. These sublime
moments were resuscitated by the master whose playing was
forever the begetting of gods.
Anne Ulwing’s soul was carried on glowing wings by Beethoven’s
Appassionata to Thomas over the heads of the crowd. She felt that
the waves of the music swept them together and that they became
swallowed up in some boundless glittering veil.
The hall was delirious again. People stood up. Some rushed to the
platform and continued to applaud there.
The artist began to play a composition of his own. And then, as if
his marble countenance had been set aflame, fire shone on his
brow, fire streamed from his eyes and the creative artist wandered
and was alone by himself.
Anne turned towards the piano. This was different from anything
she had ever heard. Long-forgotten words recurred to her mind:
“One has to create like God. Even the clay has to be created anew.”
Applause rose again, but the clapping seemed more restrained. It
was addressed to the virtuoso, not to the creator.
“They don’t understand him,” said Anne disappointed.
“It is not yet safe to admire this music. It came too early ...” and
again the words of Adam Walter came to her mind.
Then everything was forgotten. Her eyes searched for Thomas in
the crowd thronging towards the exit. In the dust-laden heat of the
cloak-room people pushed each other. Under the porch the doors of
the carriages slammed. A hoarse voice shouted the names of the
coachmen.
Anne saw Florian and made a sign to him. Ulrich Jörg was already
in the carriage.
“I should like to walk,” said the girl hurriedly. The old gentleman
was sleepy. The horses of the next carriage became restive in the
cold. The door banged. Anne felt herself free.
“Let us go....”
Florian’s broad, good-natured face turned to her for an instant in
wonder. Then he followed her obediently in the snow.
A motionless figure stood at the street corner under a lamp
peering into the windows of the passing carriages. Suddenly he
looked no longer towards the carriages. His dark sad eyes rested on
Anne. He held his hat low in his hand and snow fell on his thin face.
They clasped each other’s hands and the peace of their mind was
like the languid moment, still incredible, when a bodily pain has
abruptly ceased to torture.
The sound of rolling carriages spread in all directions. Occasional
laughter flared up among the human voices, dying away at a
distance. After that, only the snow was falling in slow, shiny flakes.
By tacit agreement they started, side by side, into the great
whiteness.
Anne did not feel the cold. The furs slid down her bare shoulders
and her low shoes sank deep into the snow. Illey gazed at her in
rapture, then pulled himself together. He wanted to appear calm, but
his voice was strangely changed.
“When I saw the posters of the concert, I began to hope that we
might meet. It all happened more wonderfully than my wildest
hopes.”
Anne too tried to control herself.
“So you really did not go for the music’s sake?” she asked in a
whisper, smiling.
“I never go to concerts,” said Illey candidly. “I don’t understand
the higher music.”
Anne turned to him anxiously:
“Then you did not understand what I sang to you?”
“I did not understand the music, but I understood her who
produced it.”
Anne’s thought became confused. Till then she had thought that
they met, united in music.... And now Thomas told her that he did
not understand the only language which her soul, her blood could
speak.... It did not matter, nothing mattered so long as he was here,
if only he could be at her side.
She drew her head back a little and with eyes half shut looked
longingly at Illey’s shoulders as though she would, by the intensity of
her regard, build a nest there for her little head.
Thomas began to walk at a noticeably slow pace. Then Anne too
noticed the snow-covered lamp in front of the Ulwings’ house.
“I have sought this moment for a long time,” said Illey quickly. “I
was seeking it on the island when I waited for you so long—till the
stars appeared and the ferryman lit a fire for the night. Next day I
was there too. I have pulled the bell at your door many times. I saw
your face through the window, I heard you play the piano, yet I was
told you were not in. Florian avoided my eyes when he said that. I
understood. It was not desired that I should come.”
“And I was expecting you.” There was so much suffering in Anne’s
veiled voice that all became clear to Illey.
At this moment they came in sight of the house. They stepped so
slowly that they remained practically on the same spot, yet the
distance grew smaller. The porch moved out of the wall and came to
meet them rapidly, dark through the glittering whiteness. The two
pillar-men came with it too. They leaned more and more from under
the cornice and looked down on them.
The porch stopped with a jerk. They had reached the end of the
street. Anne’s heart stood still with anguish. One more moment and
they would be together no more.
Florian dropped the latch key. He fumbled slowly, very slowly with
his hand in the snow and never looked up once while doing so.
Thomas Illey bent to Anne:
“We cannot live any more without each other,” and he kissed her
hand.
Snow was falling slowly and through the snow-white veil they
looked silently into each other’s eyes.
When Anne walked up the stairs she took Thomas’s kiss with her
lips from her hand.
Next day she told her father all that had happened and when in
the afternoon the front door bell rang Florian opened the door with a
broad beaming face to Thomas Illey.
Anne heard his steps. The steps passed her door, along the
corridor, towards the green room.
Thomas Illey spoke little. His voice was serious and firm. John
Hubert listened to him standing and only offered him a seat when he
had finished.
“An honourable proposal....” This reminded him that he had used
the same words to Charles Münster. He laughed and then spoke out
conscientiously, as he had decided beforehand. He spoke of the loss
caused by the fire, of bad years of business. Of Anne’s dowry. His
voice became feeble:
“I am very sorry but I cannot withdraw any capital from the
business. The estate must remain undivided. This was decided by
my late father. I cannot depart from this.”
Illey waved his hand politely, disparagingly.
“This is not my affair. It concerns Miss Anne alone.”
John Hubert stared at him with undisguised astonishment. The
charm of the ancient name of Illey re-asserted itself on him: he no
longer leaned back in his armchair. He sat straight up solemnly and
felt sorry he had till now been so business-like.
“But what about the property of Ille,” he chose his words carefully,
“I understand that it is, unfortunately, in strange hands....”
Illey turned his head away. He realized that he had just been
showing off before the other and felt ashamed. This mild-eyed good
old business man reminded him of that which had attracted him at
first to Anne. It was no good denying it; in those times he thought
that the Ulwings were rich and that the ancestral property of Ille
might again become his own. He now tried to justify himself for
those old thoughts by the longing for the land of his forebears.
There was one hope. He thrust it aside.
John Hubert looked at him expectantly.
“Did Mr. Illey not think of buying the property back?”
Many a proud, disinterested word came to Illey’s mind. To rise
above everything, even above himself. To ask for nothing, only for
Anne whom he loved. He turned his sharp gentlemanly face to John
Hubert. He looked him straight in the eyes, as if making a vow:
“I think no longer of buying Ille back.”
John Hubert enquired politely after his family.
Thomas slowly turned the old seal ring on his finger. He began to
speak of his father. He died young of heart disease. His mother
followed him. Then the property got into the auctioneer’s hands.
Only a swampy wood remained. Nobody wanted that. And a little
money. He wanted to learn to work. This brought him to town. He
wanted to regain possession of the land through his own exertions.
Had it not given them their name, or had it not received its name
from them? However it was, the land of Ille and the Illeys had
belonged to each other for nearly a thousand years.
Thomas looked down wearily. He thought that the fate of the
Lord-Lieutenant’s grandchildren had overtaken him too.
“I studied law,” he said quietly, “like the rest of us; politics
absorbed me and I did not learn to work for money. That is in our
blood. It is only when work is done gratuitously that the Hungarian
nobility does not blush to work. Those of us who gave themselves
for money became bad men; the good ones were ruined.”
John Hubert nodded absent-mindedly. He was quite reassured
now that he had ascertained that Thomas Illey did not intend to
withdraw Anne’s dowry from the business. He proffered his hand to
him.
“It is settled. You do not think of buying Ille back. You won’t
meddle with the business. Now we can look at the ledgers and the
balance sheet.”
Thomas smiled. He wanted to see nothing but Anne, and John
Hubert opened the door of the sunshine room to him. There
everything was bright and warm.
When the new spring made earth and sky bright and warm around
the old house, Mamsell Tini stuck a wreathed veil into Anne’s hair.
Now, like a white cloud, the veil floated through the old rooms,
caressed the doors and walls. Anne kissed her father.
“Thank you, father,” said the girl. “I am so happy.”
Tears came into the eyes of John Hubert. Life had no more joys in
store for him....
In the corridor stood old Füger, and Mrs. Henrietta in a starched
bonnet, and Mr. Gemming. Poor little Feuerlein, deeply stirred, wiped
his eyes. None bowed more respectfully to Thomas Illey than Otto
Füger.
Above, high above the roofs, the bells clanged loud from the
church steeple of Leopold’s town, bells that had so often spoken of
the destinies of the Ulwings. And under the porch the two pillar-men
looked down into the flower-laden carriage.
The porch repeated once over the sound of the parting wheels,
then the house fell into silence. Anne carried her quiet laugh away
with her on her honeymoon. Everything became quiet, the men, the
days.
John Hubert was quite alone. A letter from Christopher, one from
Anne. He read them both many times over, smiled and shut his eyes.
Nowadays, he was always sleepy. He looked at the clock. Too early
to go to bed. He walked up and down in the quiet rooms.
From the green room the light of the lamp reached the dining
room. The sunshine room received light from a lamp in the street
which spread over the ceiling. The old nursery was quite dark.
John Hubert folded his hands behind his back and walked slowly
from darkness into light, from light into darkness. He thought of his
life. It had been like that too, but now that he looked back on it
there seemed to have been more darkness than light.
He could not understand what made him think of this just now
when his head was weary enough. For an instant he intended
sending for the doctor. Then he felt too tired to do it.
While he slowly turned the key in his watch, he felt giddy, yet he
put all the various objects from his pocket into the alabaster tray. His
keys, his penknife and the cigar case embroidered with beads. This
he carried as a habit, having renounced smoking several years ago.
Next day was Sunday. He did not get out of bed. From time to
time Tini came in to ask if he wanted anything. He opened his eyes,
nodded, but said nothing.
Gárdos, the physician, reassured him.
“It will pass away; it is only a little overwork,” and prescribed nux
vomica.
“No, you must not write to the children.”
During the week John Hubert was up. On Sunday he again stayed
in bed and felt better there. A letter came from Anne. He smiled at
it. So there was one person in the world who owed him her
happiness.... He smoothed his blanket down and turned to the wall.
A loud buzzing woke him at night. His head turned, the bed
turned, so did the room. And he breathed with difficulty. He wanted
to unbutton his shirt collar, but did not succeed. He sat up suddenly
and with his accustomed movement put his hand several times to his
neck as if to put his necktie right.
Then he fell back and moved no more.
That night John Hubert Ulwing died, correctly, without much ado,
just as he had lived.
CHAPTER XV
The house was empty and silence nestled between its walls. It was a
memorable event for the corridor to hear the sound of steps. The
ticking of the marble clock resounded through all the rooms, no
noise impeding its progress.
Thus did Anne find the house when she came back with her
husband from the interrupted journey which was to remain in her
memory like a broken dream.
Days without thoughts. Gentle words. Pure, girlish fears. Then she
became accustomed to Thomas’s embraces. The news of her father’s
death roused her and she could dream her dream no more. It was
gone for ever. Another came.
Real life took its place and the first year passed away.
Slowly the peace of the old house became bright again. Now and
then the rooms began to laugh timidly. They stopped suddenly,
ashamed of themselves, as if remembering those who had left by
the door never to come back again.
Another year went by.
The yellow walls of the old house were warm in the sun. In the
garden the beds put forth blossom-laden rosebushes, climbing
garlands of roses.
The rooms now laughed freely with the rippling laughter of a child.
And the house smiled to itself, like some good old patriarch who has
regained youth.
At that time Anne sang some wonderful little songs. She had
never learned them, they came of themselves and their soothing
rhythm was like the rocking of a cradle. Then she lifted her son with
that mysterious movement, which is more exalted than the gesture
of love, a movement secretly known by her arms long ago. And she
thought that it was this that linked all humanity. An endless, blessed
chain, a chain wrought of women’s arms over the earth, beginning
with the first woman and to end with the last child.
“Mamma,” babbled little George. Anne repeated in whispers the
word which was bestowed on her, which she herself had never
uttered to her mother; she looked at the fading portrait of Mrs.
Christina. She began to listen. The street door opened. Steps came
along the corridor....
“Thomas, I was longing for you!” She would have liked to say
more, something warmer. She wanted to tell him her love, but the
words were bashful and changed as they crossed her lips. She
leaned towards her husband, ready to be kissed.
Illey did not notice it; he was thinking of something else. He
began to read a letter.
“From home....”
“From home?... Is not this your home?” Anne’s head, held till now
sideways in a listening attitude, rose slowly.
Thomas saw nothing, heard nothing when Ille was in question.
Everybody, the old steward, the bailiff, the agent, the priest,
anybody who was in difficulties, came to him, as if he were still the
landlord. He did their errands and his eyes shone when he spoke of
them.
Anne looked at him motionless. A feeling came over her of which
she could never rid herself whenever Thomas spoke of Ille. It
seemed to her that her husband abandoned her and went far away
to some other place.
“Thomas,” she whispered, as if to recall him.
Illey smiled inattentively. He was still reading the letter. Anne’s
face became grave and cold. The tenderness which had till then
flowed bootlessly from her shrank back painfully into her heart.
“No, don’t go away. Come here. Read this....”
But Anne would not go nearer him. She held her head rigidly
erect. After the vain inclination to tenderness she hoped to regain
the balance in this way.
“It doesn’t matter, Thomas,” and animosity sounded in her voice,
“after all I don’t know those people of yours.”
“Why do you speak like that?” He looked at her reproachfully.
Again Anne’s voice baffled the hope in his soul, with which he
thought of Ille, which still gained, against his will, the upper hand
over him.... If he were to tell her everything, if he explained to her
that everything belonging to Ille was grown to his heart, that he was
craving for his land ... would she understand? The words shaped
themselves so intensely in his mind that he nearly heard them
sound. But they seemed abasing, as if they were begging. He felt
that he could never utter them.
In that moment Anne saw her husband’s countenance hard and
frigid.
“Why are you angry, Thomas?” Her eyes wandered to the letter
from Ille. “Don’t you understand? It will all be empty talk. All this is
so strange to me.”
“You are right!” Illey gave a short reproachful laugh. It dawned on
him suddenly that Anne was strange to all that which lived so vividly
in his blood and his past. Strange, and perhaps she wanted to
remain so.
While they were silent it seemed to both of them that they had
drawn further apart from each other, though neither of them had
moved. Then it was Thomas who turned away. Anne looked after
him.
In the beginning, when they could not understand each other,
they forgot it in an embrace. Later on, the weak, helpless cry of a
baby in the next room was enough to remove everything from their
minds and to make them run to it side by side; before they had
reached the door they had grasped each other’s hands.
On this occasion each of them remained alone. The words he had
spoken weighed cold on Anne’s memory; those he had kept back
made her anxious. She played with her little son absent-mindedly.
She fumbled idly in her work-table’s drawers. She gave that up too.
She wanted to go to her husband, lean her head against his
shoulders, and ask and answer till there remained nothing between
them that was obscure and uncertain.
But Thomas had visitors. From the green room the voice of
gentlemen reached the dining room and the smoke of their pipes
pervaded the place. They talked of the reconciliation of the King and
the country, of the coronation, of those who performed it, of
Parliament, of great national transformations.
Since the constitution had been re-established, Illey had entered
the service of the State; he worked in the Ministry of Agriculture.
Anne heard him in the adjoining room make some remarks on
intensive culture.
How coolly and intelligently Thomas spoke, while her own heart
was still heavy and sore. Suddenly her husband’s laughter reached
her ears through the closed door. Her eyebrows stiffened and
straightened, as if she had been hurt....
It was about this time that Thomas Illey began to go shooting
more often. His friends who owned property in the country invited
him. Down there in Ille, in his swampy wood, game was plentiful.
When he was free from his office he took his gun and was off. Then
he came home again happy, with a sunburnt face.
In the green room arms stood in the old cupboard where Ulwing
the builder used to keep his plans. Above the couch the portrait of
the architects Fischer von Erlach and Mansard were replaced by
English prints of hunting scenes. Cartridges were kept in the small
recesses of the writing table with the many drawers. A finely
wrought hunting knife lay in front of the marble clock.
Anne sometimes felt that Thomas did not love the old house or
the green room or the cosy, well-padded good old furniture.
“I say, Anne, these chairs here stand round the table like fat
middle-class women in the market. They hold their arms akimbo and
are nearly bursting with health.”
He laughed quietly.
“Is it possible you cannot see how funny they are? At home, in
Ille, there is a similar armchair in the nursery. We called it ‘Frau
Mayer’ and put a basket on its arm.”
Anne blushed a little and, disconcerted, looked at the chequered
linen covers.
“They insult us,” she said, as if speaking to the armchair, “though
we belong together....” She thought suddenly of the staircase in the
Geramb house, of Bertha Bajmoczy ... the old indignity ... the old
resentment. Then, as if her grandfather’s voice echoed in her
memory, “I am a free citizen.”
She raised her head. Her young neck bent back disdainfully.
“How beautiful you are, like this,” said Thomas and his voice
altered.
The woman’s shoulder trembled. That was the old voice that
thrilled her like a touch. They looked at each other for a moment
and then she disappeared in Thomas’s embrace.
Anne felt that in her husband’s arms all her cares vanished, that
she herself passed away. Her head fell back, no longer with pride
but with that feminine movement which expresses the conquest of
the conqueror.
“My love....”
They held each other for a long time tightly embraced and the
silence of rare and secret reunions came over them. When the
silence broke, the reunion was ended and they both withdrew into
themselves.
Later in the day, Anne came running through the rooms with a
telegram and joy rang in her voice:
“From Christopher!”
“Is he still in Baden-Baden?” sneered Thomas.
“He is coming to-night.”
“It is time....”
Anne cast her eyes down sadly. She always felt some irritation in
Thomas’s voice when he spoke of Christopher and that pained her. It
was true that since their father’s death Christopher had travelled a
great deal, but Otto Füger sent him regular reports and when he
was home he worked.
Business must have been excellent. There was more luxury in the
house than ever. Christopher had replaced the old boards by parquet
flooring. Carpets were laid on the stairs and two pairs of horses
stood in the stable. A manservant served at table in Netti’s place.
Florian opened the gate in livery. Anne received as much money as
she liked for housekeeping, that was all she understood. But if
Thomas was not content, why did he keep silent? Surely it would
have been his duty to look through the business books. Why did he
shrink from it?
Anne believed that he despised the business and, as in her mind
the business and the name of Ulwing were inseparable, she felt
affronted by her husband’s aloof indifference. In the beginning, she
had frequently raised the question with Thomas. He always
maintained a repelling silence.
She turned to him, but her husband, as if divining her thoughts,
anticipated her.
“Let us leave that alone, darling. I won’t interfere with the affairs
of the Ulwing business.” He thought of what her father had told him
when he asked for his daughter’s hand. A man must keep his word
even if he has not given it formally. He put his arms out and drew
his wife onto his knee.
“Let us stay together. I have to leave to-night, I am going
shooting to-morrow.”
Anne put her arms round Thomas’s neck. However much she
desired it, she would not ask her husband in words not to go away
from her. But to-day she knew something that was sure to retain
him. She smiled into his face.
“Do you know what day to-morrow is?”
Thomas became cheerful.
“Of course, Sunday. I can go to shoot.”
“The third anniversary of our wedding,” whispered Anne.

You might also like