Instant Download Guide To Java: A Concise Introduction To Programming (2nd Edition) James T. Streib PDF All Chapters
Instant Download Guide To Java: A Concise Introduction To Programming (2nd Edition) James T. Streib PDF All Chapters
com
https://ebookmeta.com/product/guide-to-java-a-concise-
introduction-to-programming-2nd-edition-james-t-streib/
OR CLICK BUTTON
DOWLOAD NOW
https://ebookmeta.com/product/concise-guide-to-databases-a-
practical-introduction-konstantinos-domdouzis/
https://ebookmeta.com/product/a-concise-introduction-to-robot-
programming-with-ros2-1st-edition-francisco-martin-rico/
https://ebookmeta.com/product/introduction-to-programming-with-
java-a-problem-solving-approach-3rd-edition-john-dean/
https://ebookmeta.com/product/concise-guide-to-object-oriented-
programming-an-accessible-approach-using-java-undergraduate-
topics-in-computer-science-1st-edition-kingsley-sage/
Java An Introduction to Problem Solving and Programming
7th Edition Walter Savith
https://ebookmeta.com/product/java-an-introduction-to-problem-
solving-and-programming-7th-edition-walter-savith/
https://ebookmeta.com/product/learning-java-an-introduction-to-
real-world-programming-with-java-5th-edition-marc-loy-patrick-
niemeyer-daniel-leuck/
https://ebookmeta.com/product/a-concise-introduction-to-
algebraic-varieties-1st-edition-brian-osserman/
https://ebookmeta.com/product/a-concise-introduction-to-
logic-14th-edition-patrick-j-hurley/
https://ebookmeta.com/product/a-tutorial-introduction-to-vhdl-
programming-gazi/
Undergraduate Topics in Computer Science
Guide to Java
A Concise Introduction
to Programming
Second Edition
Undergraduate Topics in Computer Science
Series Editor
Ian Mackie, University of Sussex, Brighton, UK
Advisory Editors
Samson Abramsky , Department of Computer Science, University of Oxford,
Oxford, UK
Chris Hankin , Department of Computing, Imperial College London, London, UK
Mike Hinchey , Lero – The Irish Software Research Centre, University of
Limerick, Limerick, Ireland
Dexter C. Kozen, Department of Computer Science, Cornell University, Ithaca,
NY, USA
Andrew Pitts , Department of Computer Science and Technology, University of
Cambridge, Cambridge, UK
Hanne Riis Nielson , Department of Applied Mathematics and Computer Science,
Technical University of Denmark, Kongens Lyngby, Denmark
Steven S. Skiena, Department of Computer Science, Stony Brook University, Stony
Brook, NY, USA
Iain Stewart , Department of Computer Science, Durham University, Durham,
UK
Joseph Migga Kizza, College of Engineering and Computer Science,
The University of Tennessee-Chattanooga, Chattanooga, TN, USA
‘Undergraduate Topics in Computer Science’ (UTiCS) delivers high-quality
instructional content for undergraduates studying in all areas of computing and
information science. From core foundational and theoretical material to final-year
topics and applications, UTiCS books take a fresh, concise, and modern approach
and are ideal for self-study or for a one- or two-semester course. The texts are all
authored by established experts in their fields, reviewed by an international advisory
board, and contain numerous examples and problems, many of which include fully
worked solutions.
The UTiCS concept relies on high-quality, concise books in softback format, and
generally a maximum of 275–300 pages. For undergraduate textbooks that are
likely to be longer, more expository, Springer continues to offer the highly regarded
Texts in Computer Science series, to which we refer potential authors.
James T. Streib Takako Soma
•
Guide to Java
A Concise Introduction to Programming
Second Edition
123
James T. Streib Takako Soma
Program in Computer Science Program in Computer Science
Illinois College Illinois College
Jacksonville, IL, USA Jacksonville, IL, USA
This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface
Purpose
The purpose of this text is to help the reader learn very quickly how to program using the
Java programming language. This is accomplished by concentrating on the fundamentals,
providing plenty of illustrations and examples, and using visual contour diagrams to
illustrate the object-oriented semantics of the language.
Need
This text attempts to fill the gap between the above two types of books. First, it provides
plenty of examples and concentrates primarily on the fundamentals of the Java
programming language so that the reader can stay focused on the key concepts. Second, by
concentrating on the fundamentals, it allows the text to be more concise and yet still
accessible to readers who have no prior programming experience. The result is that the
reader can learn the Java programming language very quickly and also have a good
foundation to learn more complex topics later.
v
vi Preface
The second edition retains all the features of the first edition. In addition to fixing any
known errors, any areas that could be clarified have been reworded. Features new to the
second edition, include the following:
Typically, there are three ways objects can be introduced to the beginning programmer:
Objects first.
Objects last.
Objects interleaved.
This text takes the latter approach where objects are discussed in Chapters 2, 5, and 9.
However, recognizing that some readers and instructors might want to use one of the first
two approaches, this text can be read using alternative orders. For example, should an
viii Preface
objects first approach want to be taken, after reading Chapter 1, Chapters 2 and 5 can be
read next, followed by Chapters 3 and 4. Should an object later approach want to be used,
Chapters 3 and 4 can be read prior to Chapters 2 and 5.
To help facilitate these alternative approaches, starting with Chapter 3, the Complete
Program sections at the end of each chapter have examples with and without using objects.
Note that Chapter 9 requires an understanding of arrays, which is covered in Chapter 7,
and it can be read after completing that chapter.
Scope
As mentioned previously, this text concentrates on the fundamentals of the Java
programming language such as input/output, object-oriented programming, arithmetic and
logic instructions, control structures, strings, arrays including elementary sorting and
searching, recursion, files, bit-wise logic, and parallel processing programming. As a result,
it might not cover all the details that are found in some other texts, and if necessary, these
topics can be supplemented by the instructor or reader, or covered in a subsequent text
and/or second semester course.
Audience
This text is intended primarily for readers who have not had any previous programming
experience; however, this does not preclude its use by others who have programmed
previously. It can serve as a text in an introductory programming course, as an introduction
to a second language in a practicum course, as a supplement in a course on the concepts of
programming languages, or as a self-study guide in either academe or industry. Although
no prior programming is assumed, it is recommended that readers have the equivalent of
an introduction to functions course that includes trigonometry which will help with
problem solving and understanding the examples presented in the text.
Acknowledgments
In addition to the reviewers of the first edition, the authors would like to thank Mark E.
Bollman of Albion College and James W. Chaffee of the University of Iowa for their
continued work on this edition. Also, the authors would like to acknowledge the students
of Illinois College who have read and used various sections of the first edition in the
classroom. On a personal note, James Streib would like to thank his wife Kimberly A.
Streib and son Daniel M. Streib. Takako Soma would like to thank her family and friends,
near and far.
Note that Java is a registered trademark of Oracle and/or its affiliates and that Windows
is a registered trademark of Microsoft Corporation in the United States and/or other
countries.
Feedback
The possibility of errors exist in any text, therefore any corrections, comments, or
suggestions are welcome and can be sent to the authors via the e-mail addresses below. In
addition to copies of the complete programs presented in the text, any significant
corrections can be found at the website below.
Preface ix
Website: http://www.jtstreib.com/GuideJavaProgramming.html
xi
xii Contents
1.8.5 Summing 41
1.8.6 Arithmetic Functions 42
1.9 Comments 43
1.10 Complete Program: Implementing a Simple Program 44
1.11 Summary 46
1.12 Exercises (Items Marked with an * Have Solutions in Appendix E) 47
2 Objects: An Introduction 51
2.1 Introduction 51
2.2 Classes and Objects 51
2.3 Public and Private Data Members 52
2.4 Value-Returning Methods 52
2.5 void Methods and Parameters 53
2.6 Creating Objects and Invoking Methods 54
2.7 Contour Diagrams 56
2.8 Constructors 62
2.9 Multiple Objects and Classes 66
2.10 Unified Modeling Language (UML) Class Diagrams 73
2.11 Complete Program: Implementing a Simple Class and
Client Program 75
2.12 Summary 77
2.13 Exercises (Items Marked with an * Have Solutions in
Appendix E) 78
3 Selection Structures 83
3.1 Introduction 83
3.2 If-Then Structure 83
3.3 If-Then-Else Structure 88
3.4 Nested If Structures 91
3.4.1 If-Then-Else-If Structure 91
3.4.2 If-Then-If Structure 94
3.4.3 Dangling Else Problem 96
3.5 Logical Operators 99
3.6 Case Structure 105
3.7 Complete Programs: Implementing Selection Structures 111
3.7.1 Simple Program 111
3.7.2 Program with Objects 114
3.8 Summary 116
3.9 Exercises (Items Marked with an * Have Solutions in Appendix E) 116
6 Strings 203
6.1 Introduction 203
6.2 String Class 203
6.3 String Concatenation 204
6.4 Methods in String Class 206
6.4.1 The length Method 206
6.4.2 The indexOf Method 206
6.4.3 The substring Method 207
6.4.4 Comparison of Two String Objects 209
6.4.5 The equalsIgnoreCase Method 211
6.4.6 The charAt Method 212
6.5 The toString Method 213
6.6 Complete Program: Implementing String Objects 215
6.7 Summary 219
6.8 Exercises (Items Marked with an * Have Solutions in Appendix E) 219
7 Arrays 223
7.1 Introduction 223
7.2 Array Declaration 223
xiv Contents
8 Recursion 265
8.1 Introduction 265
8.2 The Power Function 265
8.3 Stack Frames 274
8.4 Fibonacci Numbers 277
8.5 Complete Program: Implementing Recursion 289
8.6 Summary 291
8.7 Exercises (Items Marked with an * Have Solutions in Appendix E) 291
Index
0
Introduction to Computing Concepts
James T. Streiba* and Takako Somaa
a
Computer Science Program, Illinois College, Jacksonville, IL, USA
Abstract
In addition to an introduction to hardware and software concepts, including the concept of compiling,
interpreting, and executing a program, there is an introduction to computational thinking, software design,
and computer ethics.
Keywords
Hardware, Software, Computational Thinking, Software Design, Computer Ethics.
0.1 Introduction
Although this chapter is labeled as Chapter 0, that does not diminish its importance. The
reason for such a numbering is to allow readers with a previous introduction to computing
concepts and programming to proceed onto Chapter 1. However, for readers with no prior
introduction or for those who would like a refresher, this chapter provides an important
overview of hardware, software, computational thinking, software design, and computer
ethics.
0.2.1 Hardware
As many readers may already know from using application software such as a word
processor, a computer system is composed of two major parts: hardware and software.
Since this book is primarily about writing software, this section on hardware is
understandably brief. The hardware is the physical computer that includes five basic
components: the central processing unit (CPU), the random-access memory (RAM) or just
memory for short, input (typically a keyboard), output (typically a monitor), and storage
(often a disk) as shown in Fig. 0.1.
CPU
Input Output
RAM
Storage
0.2.2 Software
Compiler Assembler
The solution to making programming easier and allow programs to be used on different
machines is through the use of high-level languages which are more English-like and math-
like. One of the first high-level programming languages was FORTRAN (FORmula
TRANslation), which was developed in the early 1950s to help solve mathematical
problems. There have been a number of high-level languages developed since that time to
meet the needs of many different users. Some of these include COBOL (COmmon
Business Oriented Language) developed in the 1950s for the business world, BASIC
(Beginners All-purpose Symbolic Instruction Code) developed in the 1960s for beginning
programmers, Pascal in the 1970s previously used for teaching computer science students,
C in the 1970s for systems programming, and C++ in the 1980s for Object-Oriented
Programming (OOP).
Java is also an OOP language that was developed at Sun MicroSystems (which is now
a subsidiary of Oracle Corporation) and was released in 1995. OOP is a programming
methodology that makes it more convenient to reuse software and will be discussed further
in Chaps. 2 , 5 , and 9 .
If high-level languages are easier to learn and use, how can they be implemented on a
computer that can only understand machine language? Similar to assembly language
needing an assembler, the program needed to translate a high-level language to a low-level
language is a compiler or an interpreter. Although there is a one-to-one correspondence
between assembly language and machine language, there is a one-to-many correspondence
4 0 Introduction to Computing Concepts
between a high-level language and a low-level language. This means that for one high-
level language instruction, there can be many low-level assembly or machine language
instructions. Even though different CPUs need different compilers or interpreters to
convert a particular high-level language into the appropriate machine language, compilers
and interpreters allow the same high-level language to be used on different CPUs.
The difference between a compiler and an interpreter is that a compiler will translate
the high-level language instructions for the entire program to the corresponding machine
language for subsequent execution, whereas an interpreter will translate and then execute
each instruction one at a time. Further, a compiler might translate directly to machine
language, or it might translate the high-level language to assembly language, and then let
an assembler convert the assembly language program to machine language as shown in
Fig. 0.2. Once the machine language is created, it is subsequently loaded into the
FRPSXWHU¶V5$0DQGH[HFXWHGE\WKH&38
As mentioned above, an interpreter works slightly differently than a compiler. Instead
of converting an entire high-level program into machine language all at once and then
executing the machine language, an interpreter converts one line of the high-level program
to machine language and then immediately executes the machine language instructions
before proceeding on with the converting and executing of the next high-level instruction
(see Fig. 0.3). The result is that compiler-generated code executes faster than interpreted
code because the program does not need to be converted each time it is executed. However,
interpreters might be more convenient in an educational or development environment
because of the many modifications that are made to a program which require a program to
be converted each time a change is made.
Compile Interpreter
2. Then execute all the machine 2. And then execute only the corresponding
instructions machine instructions
Java is somewhat unique in that it uses both a compiler and an interpreter to convert the
high-level instructions to machine language. A compiler is used to convert the Java
instructions into an intermediate-level language known as bytecode, and then the bytecode
is converted into machine language using an interpreter.
Since the intent of Java was for portability on the World Wide Web, the advantage of
using both a compiler and an interpreter is that most of the translation process can be done
by the compiler, and when bytecode is sent to different types of machines, it can be
translated by an interpreter into the machine language of the particular type of machine that
the code needs to be run on (see Fig. 0.4).
Note that just as there can be a one-to-many relationship between high-level and low-
level instructions, there can be a one-to-many relationship between Java and bytecode.
However, unlike the one-to-one relationship between assembly language and machine
language, there can also be a one-to-many relationship between bytecode and machine
language, depending on the machine for which the bytecode is being interpreted.
Interpreter
Compiler
solution can be used to solve new problems. Abstraction is the filtering out of
unnecessary information. In other words, taking a step back from the specific details and
focusing on the big picture allows one to create a more generic solution. Algorithms are
step-by-step instructions to solve a problem. It is important to create a plan, an algorithm,
for the solution when solving a problem. Logical thinking is deductive inference of new
information on existing information. Computational thinking is a problem-solving
process that involves a number of core principles from computer science as mentioned
above.
But how can these principles be used in non-programming context, for example, solving
the Tower of Hanoi game? The Tower of Hanoi game consists of three pegs, and initially
one of the non-centered pegs contains several rings stacked in order of descending
diameter from bottom to top. The goal is to move the stack of rings to another non-
centered peg as shown in the Fig. 0.5.
During the process, only one ring can be moved at a time which means only a top ring is
removed among the towers at any given time. Consequently, several rings cannot be
moved at once. Another rule is that a bigger ring cannot be placed on the top of a smaller
one. At the start of the game, the only ring that can be moved is the smallest ring and it
may be placed on one of the two pegs. Next, there are two rings that can be moved. There
is no good reason to move the smallest one back to the original stack or to another peg.
So, the next move should be moving the second smallest ring. As it cannot be stacked on
the top of the smallest one, naturally it goes on the other peg. By understanding the rules,
logical thinking is used to determine the next step. When making a move, do not be
distracted by color of the rings or pegs, nor the sounds they make, but focus on the rings.
This is simplifying the problem using abstraction. As in Fig. 0.6 after successive moves,
there is a point where the largest ring is on one peg and rest of the rings are stacked on
another peg in order the largest to the smallest from the bottom to the top. Realize that
during the moves, a ring can be placed on the top of any ring that is bigger than itself, not
merely the next larger ring.
0.3 Introduction to Computational Thinking 7
Now the task is to move the stack that has one smaller number of rings. During the
process there will be a situation where the second largest ring is on the top of the largest
one and the rest of the rings are stacked in correct order on another peg as shown in Fig.
0.7.
Fig 0.7 The largest and the second largest rings in the final position
Notice that every time the largest ring of the particular stack is placed in the final
position, the next problem is to solve the same problem with one less number of rings,
which means the task to solve the Tower of Hanoi game is divided into smaller problems
using decomposition. Also realize that the same technique can be used to solve the
problem with different sizes by seeing the pattern. Making a plan of where to moving a
ring is step-by-step procedure, which is an algorithm.
be made between the syntax and the semantics of a program. Simply stated, the syntax is
the grammar of the language, and the semantics is the meaning or what each instruction
does. To explain further, syntax is the spelling of the individual words, where the
semicolons go, and so on. If mistakes are made, a compiler will detect what are known as
syntax errors, generate messages to the programmer, and the program will not be compiled
or executed. Although syntax is very important, there is a tendency for first-time
programmers to spend too much time learning syntax to avoid syntax errors. However,
there must be equal time spent on semantics to ensure that the program does what the
programmer intended it to do.
Even though there might not be any syntax errors, there can be what are called execution
errors or run-time errors, such as division by zero. When these types of errors occur, the
appropriate error messages are generated and execution stops. Even worse, there can also
be logic errors, which are mistakes in the logic of the program so that the program does
not do what was intended. The unfortunate aspect of logic errors is that they do not produce
any error messages which can make them extremely difficult to find and fix.
As an analogy, an individual might be able to build a small storage shed by just sawing
and nailing some lumber together without worrying about the overall design of the project.
However, with a larger project such as a house, apartment building, or office building, that
methodology would not be sufficient. Instead, there are many other people who must be
consulted, including the original customer who wants the building built, the architects who
work with the customer, the contractors, and the carpenters. The same holds true in the
world of programming where a programmer and/or systems analyst works with others such
as customers, users, and managers.
What are needed are various strategies and tools to help write programs correctly to
minimize logic errors. Just as in the above example where blueprints and plans are used by
the architect, there are techniques that can be used by analysts, software engineers, and
programmers. Although the complete process for developing software might not be needed
initially with smaller programs, it does not hurt to practice the various techniques on
smaller programs to gain familiarity, so that when one advances to more difficult projects,
one is comfortable with many of the techniques. Although the following techniques are
used primarily with non-object-oriented programs, they can be augmented with object-
oriented design techniques introduced in chapter 2 and used in larger programs.
0.4 Essentials of Software Design 9
There are many different methodologies and number of stages within the various
methodologies for solving problems that can be found in different texts, but upon closer
examination, they are all rather similar. They tend to include at least four stages, and they
are usually comparable to the following:
1. Analysis
2. Design
3. Implementation
4. Maintenance
0.4.2.1 Analysis
The analysis stage is where the needs of the user or customer are first determined.
Questions concerning the form and quantity of the input, the type of processing that needs
to be done, the storage requirements of data, and the type of output needed are asked and
clarified at this stage. This would be similar to a customer in a construction project trying
to determine what type of building should be built. In a first semester programming class,
this stage may or may not be included. Sometimes a professor might have already
completed the analysis stage and included what is needed in the programming assignment.
However, at other times, they might require this stage and a number of questions will need
to be asked by the student. This might be especially true when working on a team project
in a software design or senior capstone course.
0.4.2.2 Design
The design stage is where a project begins to take shape. It is similar to the architect
creating a set of blueprints and models for the user to examine, because changes are much
easier to make on paper or with the model than once the construction of the building has
started. Various tools such as pseudocode and Unified Modeling Languge (UML) diagrams
(discussed shortly) are used by systems analysts, software engineers, and programmers to
help design the program. Again, it is much easier to make changes during the design phase
than after the programming has begun.
0.4.2.3 Implementaion
The implementation stage is where the code is actually written, entered, compiled, and
syntax errors are corrected. Once the code is free of syntax errors, it is thoroughly tested.
This includes testing various components of the program to be sure each section is working
properly. If not, the code needs to be debugged to correct any logic errors. In addition to
the various components, the entire program needs to be tested to ensure that all the
components work together as planned. Sometimes errors are a result of not following the
design, whereas other times, it is not necessarily the code but rather the design itself that
has the error, in which case one has to go back and correct the error in the design. The
result is that the stages above do not necessarily need to be rigorously adhered to, but rather
when at a stage one may need to return to a previous stage for clarification or to fix a
possible error.
10 0 Introduction to Computing Concepts
0.4.2.4 Maintenance
The maintenance stage is where all the modifications and updates take place. In an
industrial strength program, more time is spent in the maintenance phase than all of the
three preceding stages. This is because once a program is up and running, there can be
numerous changes that need to be made over the lifetime of a program. This is another
reason why a program should be designed well in order to facilitate modifications later in
the life of a program. Unfortunately, beginning programmers do not often experience this
stage of a program, because once the concepts are learned from one programming
assignment, the program is often not used again and another program is assigned to
introduce the next set of concepts. However, in some upper-level courses, the assignments
get longer, existing programs might be modified and reused, and students get to have some
experience with the maintenance stage of programs. Regardless, it helps even beginning
students to design well-thought-out programs to gain practice in the event that a professor
decides it might be easier to modify an existing program rather than having to design a new
program from scratch, as done in the real world.
0.4.3.1 Pseudocode
One technique that can help during the design stage is the use of pseudocode.
Pseudocode is a combination of English and a programming language. Since it is not a
SURJUDPPLQJODQJXDJHWKLVLVWKHUHDVRQIRULWVQDPHDV³SVHXGR´FRGH7KHDGYDQWDJHRI
using pseudocode is that one can concentrate on the logic of an algorithm and not worry
about the syntax of a particular programming language. In fact, well-written pseudocode
should be understood by any programmer regardless of the programming language that
they use, and they should be able to convert the pseudocode into their particular
programming language. However, there can be many different versions and levels of detail
WKDWFDQEHLQFOXGHGLQSVHXGRFRGHVRLWLVEHVWWRFKHFNZLWKRQH¶VLQVWUXFWRURUFRPSDQ\
for any preferences or standards that are employed. As a simple example, consider the
following pseudocode on the left compared to the Java statement on the right:
At this time it is not nececessary to understand the Java code on the right. However, note
that the verbal description on the left is much easier to understand than the detailed Java
0.4 Essentials of Software Design 11
code. As a result, one does not need to concentrate on the intricate syntax, but rather the
semantics. As an alternative, notice the more specific pseudocode on the left.
Both the pseudocode and the Java code are known as assignment statements as will be
discussed in the next chapter. Note that an arrow is used in the pseudocode instead of an
equal sign in the Java code to indicate an assignment statement. This helps illustrate the
direction of assignment, since some languages use symbols other than an equal sign to
illustrate assignment. Also notice that a mathematical symbol is used instead of an asterisk
to illustrate multiplication. Lastly, a semicolon is not used since not all other languages use
them to terminate statements.
The result is that the pseudocode in the second example is more specific than the first
example which helps with the translation to Java, but it is also more generic than the Java
statement which helps in the translation to other languages as well. Again, these are just
two samples of pseudocode, so be sure to check your local guidelines and requirements
which should be used. In this text, when pseudocode is used, it will be written with as much
detail as possible so as not to be ambiguous and to help with the translation into Java.
0.4.3.2 OOP and UML
Since the term object has been used previously, what is an object? In the past, programs
were often written with large sections of code that were not very helpful to reuse when
another program needed to be written.
It can help with the understanding of the idea of objects to think of an automobile. An
automobile has many different parts such as steering mechanisms, transmissions, brakes,
etc. Instead of designing the transmission as unique to only one type of auto, a generic plan
for a transmission can be designed first. Then particular versions of the transmission could
be built to be put into different types of automobiles. The plans for the transmission can be
thought of as a class and the differing versions of the transmission as instances of that class,
or in other words, objects. This way a whole new design for a transmission does not need
to be created for each type of auto, but rather just a different variation. The same applies to
software, where a whole new complete design does not need to be created but just a
different version of the original class. Although this is just a brief glimpse of objects, this
same idea can be applied to software and a more complete discussion will be presented in
Chapter 2.
Unified Modeling Language (UML) is a visual method used to help contruct a program
using classes and objects. One might ask since Java is an Object Oriented (OO) language
and UML is helpful in creating an OO program, why would one need pseuodocode? The
answer is because each class and instance of a class or object contains code, pseudocode
can help with the design of the class. So whereas UML helps with the creating of classes
and objects, pseudocode helps with the creation of code within classes and objects. UML
will be discussed further in Section 2.10.
12 0 Introduction to Computing Concepts
0.4.3.3 Debugging
Even when all attempts to write a logically correct program are followed, the possibility of
logic errors still exists. The process of finding and fixing logic errors is known as
debugging. When trying to debug a program, a programmer should not start to randomly
alter code in the hope that the error might be fixed. Although this might work occasionally
with smaller programs, it rarely works as programs become larger and more complex.
Instead, one should look for patterns in the output in an attempt to isolate the problem.
Further, one needs to carefully check the program by walking through the code to ensure
that it is doing what was originally intended.
To assist in this process many Integrated Development Environments (IDEs), which are
used to enter, edit, compile, and execute a program, sometimes include debuggers that can
trace the contents of various memory locations to help locate a logic error. However, do
not rely on the debugger alone to help correct the problem, but rather use it as a tool to
assist in tracing the logic of the program. If a debugger is not available, well-placed output
statements at critical points in the program can help in the debugging process. In the end,
it is the programmer reading the code carefully to see what the code is actually doing, rather
than what one thinks it is doing, that will ultimately fix logic errors in a program. [9]
testing and correct operation of a program is imperative and is the responsibility of the
programmers.
The field that includes these instances and other related issues is known as ethics. Entire
stand-alone courses are offered, typically from the philosophy department, and
corresponding books have been written that address the many theories and the application
of those theories to specific instances. In addition, these ethical theories have been
applied to paticular areas such as business ethics, medical ethics, environmental ethics as
well as computer ethics. With respect to the latter, many colleges offer separate courses
in computer ethics that may be given as an elective or may be required for a major in
computer science.
Since entire books have also been written on the field of computer ethics it would not be
possible to discuss all the theories here. Fortunately, various professional organizations in
many different fields provide codes of ethics. The same is true in the field of computing
where the Institute of Electrical and Electronics Engineers (IEEE) Computer Society[3]
and the Association of Computing Machinery (ACM) [1] have each developed a Code of
Ethics. These codes help provide guidance when confronting various ethical situations
within the world of computing.
These codes are provided by their respective organizations and are available online. The
reader is encouraged to look at least one of these codes as possLEO\LQGLFDWHGE\RQH¶V
instructor. It might also prove interesting to look at both codes to see the similarities and
possible differences between them.
After examining a code of ethics such as the ACM Code of Ethics, there are some
exercises at the end of the chapter based on the discussion at the beginning of this section
that can serve either as a discussion in the classroom or as an essay question in a
homework assignment. Although it is beyond the scope of this text to examine the
theories and codes in any detail, there are a number of texts that examine theories and
LVVXHVLQPRUHGHWDLOVXFKDV³(WKLFVLQ&RPSXWLQJ$&RQFLVH0RGXOH´E\-RVHSK0LJJD
Kizza. [5]
0.6 Summary
Machine language and assembly language are low-level languages, where the former
uses ones and zeros and the latter uses mnemonics.
High-level languages are more English-like, where C, C++, and Java are examples of
high-level languages.
Compilers convert the entire high-level language program into machine language
before executing the machine language program, whereas interpreters convert a high-
level language program one instruction at a time and then execute only the
corresponding machine language instructions before converting the next high-level
instruction.
Java is a hybrid system, where the Java instructions are converted into an intermediate
language called bytecode using a compiler and then the bytecode is converted into
machine language using an interpreter.
Computational thinking is a problem-solving process that includes decomposition,
pattern recognition, abstraction, algorithms, and logical thinking. The above are skills
that you can apply in life in general.
14 0 Introduction to Computing Concepts
3. Compare the two codes of ethics mentioned previously in Section 0.5. Identify
one or more elements that are similar. If possible, identify one element that
appears in one code but does not seem to appear in the other.
4. Using one of the code of ethics such as the ACM Code of Ethics, or the code
assigned by the instructor, analyze the following scenarios as to the proper course
of action. Be sure to indicate which element in the code applies.
a. A student in a first-year course has asked a fellow student for assistance with
their programming assignment. After starting to look over the program for the
SRWHQWLDOHUURUWKHVWXGHQWVHHNLQJDVVLVWDQFHVD\V³7KLVLVVXUHWDNLQJDORWRI
time. Might it be easier to just send me a copy of the file containing your
SURJUDPDQG,FDQMXVWFKDQJHWKHQDPHDWWKHWRS"´$FFRUGLQJWRWKHFRGHRI
ethics selected or assigned, what should the student who is providing the
assistance do? What alternatives are there?
Abstract
This chapter provides an initial skeleton program from which to create subsequent programs. An introduction
to variables, constants, assignment statements, arithmetic operations, and simple input/output using the
keyboard and monitor is also provided. Further, there is a discussion concerning comments and a simple
complete program is included at the end of the chapter.
Keywords
Input/Output, Variables, Assignment Statement, Arithmetic, Comments.
1.1 Introduction
This section introduces the reader to the basics of the Java programming language and
helps get the first program up and running as quickly as possible. To that end, the
explanation of some of the more complicated aspects of a Java program are deferred until
later. Many of the OOP (Object-Oriented Programming) concepts are only briefly
introduced, but will be discussed more thoroughly in Chapters 2, 5, and 9. For those who
want a more detailed discussion and elaboration of some of the concepts presented in this
chapter, it can be found in Appendix A. However, note that for some of the sections of
Appendix A, it helps to have read at least Chapters 2, 5, and possibly 9, or have had
previous OOP programming experience.
The first line in the program begins with the reserved word class. A reserved word is
one that has a special meaning in a program and cannot have its meaning changed by the
programmer nor can it be used for other purposes. As briefly discussed in Chapter 0, a class
is a definition of a group of objects. Although classes and objects will be discussed further
in Chap. 2 , for now think of a class as a blueprint for a house and the houses built from
the blueprint as objects.
The word Skeleton following the reserved word class, is the name of the class
that is provided by the programmer. This name is known as an identifier and the rules for
identifiers will be discussed in Section 1.4. Note that usually class names begin with a
capital letter. The entire definition of the class, Skeleton, should be placed between the
first opening brace and the last closing brace, { }.
This class has one method definition starting on the second line. A method is like a
function in mathematics which are sent values via arguments and can return a single value.
Typically, the body of the method is indented to improve the readability of the program.
The word main is the name of the method. When a program is run, the system will
search for the main method and start executing instructions in the main method. For now,
the rest of the words in this line will be discussed later throughout the text and in Appendix
A. The definition of the main method also starts with an opening brace and ends with a
closing brace. Inside the braces, a sequence of instructions would be placed. For now, the
method does not have any instructions and only contains a comment line.
Comments will not be compiled and executed when the program is run. They are used
to make programs easier for other programmers to understand. Comments can start with
// symbols and continue to the end of the line as shown in Figure 1.1, or be placed between
/* and */ symbols. The // symbols are used for a single-line comment, and /* and */
are used when the comments run over multiple lines. Comments are discussed more
thoroughly in Section 1.9, The above program should compile without any syntax errors
and run without any execution errors, except unfortunately it does not do anything.
³+HOOR:RUOG´
Unless a program performs some type of output, it is not particularly useful and it is
difficult to know whether the program has run. Output can be of many forms including
output to a screen, a printer, or a disk. In this section, only output to a screen will be
considered. Although there are several ways to output data to the screen, this section will
examine the simplest of them to get started.
1.3 “Hello World!” 19
One of the more common first programs written when learning a new language is the
LQIDPRXV³+HOOR:RUOG´SURJUDP7KHDGYDQWDJHRIWKLVSURJUDPLVWRPDNHVXUHWKDWRQH
is writing a program correctly and using the compiler properly. This program can be written
as shown in Fig. 1.2.
The program looks very similar to the original Skeleton program in Fig. 1.1, except
that the class name has been changed from Skeleton to Output and the comment line
has been replaced with the System.out.println("Hello World!"); statement.
This statement outputs the string contained within the double quotation marks to the
monitor. Java uses System.out to refer to the standard output device which by default
is the monitor. To perform output, one simply uses the println method to display a
primitive value or a string to the monitor. The println method is part of the Java
Application Programming Interface (API) which is a predefined set of classes that can be
used in any Java program. The classes and methods in the Java API provide a variety of
fundamental services that are not part of the language itself.
Go ahead and try typing in this program on your computer using the IDE (Integrated
Development Environment) installed in your lab, home computer, or place of employment
and then compile and execute the program. Provided there are no syntax errors, the output
should appear similar to the following, where the underscore represents the ending location
of the cursor on the screen:
Hello World!
_
Notice that the quotation marks are not output to the screen and the cursor appears on
the next line. Also note that the cursor might not appear on the screen, since there is no
input yet, but in this example, it serves to illustrate where any subsequent input or output
would appear.
20 1 Input/Output, Variables, and Arithmetic
Simple GUI based output to display a message dialog box can be accomplished by using
the showMessageDialog method as shown in Fig. 1.3.
import javax.swing.*;
class MsgBoxOutput {
public static void main(String[] args) {
JOptionPane.showMessageDialog(null, "Hello World!");
System.exit(0);
}
}
Also, notice that the last statement System.exit(0) causes the program to stop
executing since a program with JOptionPane does not automatically stop when the
end of the main method is reached. When the program above is executed a dialog box
shown below appears on the screen.
1.4 Variables and Constants 21
When the user clicks the OK button, the dialog box will close. Both types of output, text-
based and GUI-based, will be used throughout the text, with text-based used more
frequently due to its simplicity.
The address of the mailbox is usually a number, like the address of a memory location
in a computer. At the machine language level, the address is in ones and zeros, just like the
machine language instructions mentioned in Chapter 0. However, using numbers to
represent the address of a memory location can be quite confusing, especially if there are
hundreds of memory locations in a program. Instead, it is helpful to use characters to form
names, called symbolic addressing, to make it easier to remember what data is stored in
what memory location as shown in Fig. 1.5. In this example, the name number is used to
describe the contents of the corresponding memory location. This is one of the primary
advantages of using assembly language over machine language, and this is also true of all
high-level languages including Java.
Typically, the types int, double, char, and String are the ones that are used the
most frequently. For example, should one want to declare a variable named number and
have it store an integer, it would be declared as follows:
int number;
First the type is indicated, in this case int for integer, and then the identifier or name
of the variable number is given, followed by a semicolon. An identifier or the name of
the variable can be almost anything except for a reserved word as discussed in Section 1.2,
but there are certain rules that need to be followed as well as some suggestions that should
be followed. The length of the variable name can be from 1 to any number of characters
long. Further, the variable name can be composed of letters, numbers, underscores _, and
dollar signs $, but must begin with a letter. Also, the variable name is case sensitive,
meaning that cat, Cat, and CAT are separate variable names and correspond to separate
memory locations.
1.4 Variables and Constants 23
Typically, a variable name should not be too long, because they can be difficult to read,
but by the same token, they should not be too short either, for it could become difficult to
remember what it represents. For example, if the letter n were used instead of number,
then it might not be clear whether n stood for name, number, or numeral. Exceptions
to this are for variables from a mathematical expression. For example, the variables x, y,
and z are commonly used to represent the points of a Cartesian coordinate system, and i,
j, or k are used for loop control variables as will be discussed in Chap. 4 . Although most
of the time this text will avoid the use of shorter names, on occasion shorter names might
be used to save space or for the sake of simplicity to concentrate on other aspects of a code
segment. If a variable is too long, it can be difficult to read as in the following:
numberofcatsanddogs. Common practice in Java is not to capitalize the first letter of
a variable but to capitalize the first letter in all subsequent words, as in
numberOfCatsAndDogs. Notice that it is a little easier to read that way. Also on
occasion, abbreviations can be used such as num instead of number, but be sure to use
good ones. Further, this text will occasionally show some of the more commonly used
abreviations.
Variables of other types can be declared as well, such as a variable of type float or
double. Although numbers of type float WDNHXSOHVVVSDFHLQWKHFRPSXWHU¶VPHPRU\
they are less precise and can sometimes cause inaccuracy in calculations. Even though they
take up more memory, this text will use double variables to alleviate some possible
problems later. For example, should one want to declare a variable to hold a double
precision value, it would be declared as follows:
double average;
Further it could contain a value and would look like the following:
Notice that instead of showing the number zero as an integer, it is represented as a real
number with a decimal point, to indicate its type as a double.
All of the types given in Table 1.1, other than the String type, are known as primitive
data types, meaning that when they are declared, the memory needed to store the associated
data is allocated at that time. However, a String data type is a reference data type. When
a variable of type String is declared, the memory allocated is not used to store the data,
but rather only to store a reference to the data. String data types are unique in that although
they are technically objects, they can be used syntactically as if they were primitive data
types.
The first part of this text will use strings in a very limited capacity. An understanding
of strings is much easier once one has had an introduction to objects and practice with
objects, so a full description of how string objects are created and manipulated is presented
in Chap. 6 +RZHYHUIRUQRZWKLVWH[WZLOOUHSUHVHQWVWULQJV³DVLI´WKH\DUHSULPLWLYH
data types, and the following shows a character primitive data type and a simplified view
of the string data type. For example, a character and string could be declared as follows:
24 1 Input/Output, Variables, and Arithmetic
Note that the char data type is represented using single quotation marks and that the
String is represented using double quotation marks. Although a character could be
represented as a String of length one, it is usually better to use the char data type.
Further, there are also ways to extract a single char type from a String data type. Again,
a full description will be deferred until Chap. 6 .
In contrast to variables, a constant can be declared so that its value cannot be changed.
Although not nearly as useful as variables, constants have their place in a program when a
value does not need to be changed, nor should be changed. For example, if an integer N
needs to remain a 7, then it could be declared as follows, where the use of the reserved
word final indicates that N is a constant:
final int N = 7;
Typically, constant names are declared as all capital letters to help other programmers
distinguish them from variables. In another example, suppose a number like PI needs only
two digits after the decimal point, then it could be declared as follows:
final double PI = 3.14;
Although the use of a constant might not be readily apparent at this time, their use will
become clearer in subsequent examples after discussing assignment statements in the next
section.
Does this mean that all variables need to be initialized to some value? Not necessarily.
As will be seen, only those variables that need an initial value for subsequent processing
1.5 Assignment Statements 25
should be initialized. Initializing a variable to a value when it does not need to be initialized
could be confusing to other programmers reading the code, as will be discussed later in this
chapter and in Chap. 4 on iteration structures.
So, if a variable is assumed not to be initialized, how does one initialize a variable to a
value such as 0 or any other value for that matter, such as 5? After a variable is declared,
it can be given a value in an assignment statement using an assignment symbol. The
assignment symbol is the equal sign. However, when one first starts to use the equal sign,
RQHPXVWUHPHPEHUWKDWLWGRHVQRWPHDQWKDWWKHYDULDEOHRQWKHOHIWLV³HTXDOWR´WKHYDOXH
on the right, but rather that the value on the right is copied into or assigned to the variable
on the left. Again, this is best shown by way of an example:
int number;
number = 5;
After the variable number is declared as type int, the second statement indicates that
the integer 5 is assigned or copied into the variable number and the memory location
would then appear as follows where green indicates a change:
number 5
Again, the assignment statement is not really saying that number is equal to 5 or equals
5, but rather that the variable number is assigned a 5 or takes on the value of 5. Although
it is tempting to say that number equals 5 and even though most people will understand
what is meant, try to avoid saying it, and there will be less difficulty in the future as shown
in Sect. 1.8 on arithmetic statements.
Note that it is possible to combine the previous two statements into one statement as
shown below. It looks similar to the definition of a constant in the previous section but
without the word final in the statement:
int number = 5;
The above syntax is perfectly legal and saves a line when writing a program. However,
when first learning a language, it helps to reinforce the distinction between the declaration
of a variable and the assignment of a YDOXHWRDYDULDEOH2IFRXUVHLIRQH¶VLQVWUXFWRUGRHV
not mind the above shortcut or if one is studying this text on their own and likes the
shortcut, then go ahead and use it. However, this text will use the previous two-line method
at least for the next few chapters to help reinforce the distinction between the declaration
of a variable and the assignment of a value to a variable.
Continuing, what if one wanted to take the contents of number, and copy it into another
memory location named answer? For example, consider the following code segment:
The third line then takes a copy of the contents of number and places it into the
memory location answer as shown below:
number 5 answer 5
Note that the assignment statement does not remove the 5 from number and put it into
answer, but rather it takes a copy of the 5 and puts it into answer. The original 5 in
number does not disappear. Why does it copy and not move it? The reason is because it
is actually faster for the computer to copy it and not take the time to delete the original.
This is a fundamental concept in most computer languages and will become more important
in the writing of subsequent programs.
Again, the important point to notice is that the copying of values is from right to left,
not left to right. This sometimes causes confusion among beginning programmers, possibly
because they are used to reading from left to right. The reason why Java and many previous
languages go from right to left is because they are mimicking some of the assembly
languages on many machines. Ideally it would be nice if languages used an arrow to show
how values are copied as shown below:
However, most keyboards do not have an arrow character, so an equal sign was used.
Just be very careful to remember that values are copied from right to left and there should
not be any problems.
Assigning variables of type double is similar to the above and will not be shown here;
however, a couple of points need to be made concerning assigning variables of different
types. For example, what would happen if a variable of type int was assigned to a variable
of type double as shown below?
int number;
double result;
number = 5;
result = number;
As before, the contents of the memory locations after the assignment of 5 to number
would be as follows:
Then when the next assignment statement is executed, the int value of 5 would be
1.5 Assignment Statements 27
Would the value in number be converted to a 5.0? The answer is no, as shown above,
because only the variable to the left of the assignment symbol is altered by an assignment
statement. The 5 in number is not converted, but rather when it is copied, it is converted
to the proper type so that it can be assigned to result.
If an int value can be stored in a variable of type double, is the reverse true? The
answer is no, because, for example, how could the number 5.7 be stored as an integer
without the fractional part? A way around this problem is to use a typecast operator. A
typecast operator allows a value of one type to be converted to another type. In the case
below, the typecast operator (int) converts the double value in number to type int
so it can be assigned to result. As before, the value in number would not change and
would still contain a 5.7. However, what happens to the fractional part? The result is that
it is truncated and a 5 is stored in result:
double number;
int result;
number = 5.7;
result = (int) number;
What if the value needed to be rounded instead? Fortunately, Java has the Math class
which contains a method named round. As mentioned previously, a method is somewhat
like a function in mathematics. The name of the class, Math, is followed by a period and
the name of the method, round. Parentheses are placed after the method name and contain
the argument, number, which is sent to the method. The code segment from above is
rewritten below:
double number;
int result;
number = 5.7;
result = (int) Math.round(number);
Unfortunately, when the round method is sent a value of type double, it returns a
value of type long, but the typecast operator (int) can again be used to convert the
value of type long to type int. Since number initially contains 5.7, the variable
result would contain a 6. Again, the value in number would not change and would still
contain a 5.7.
Of course, if the precision of the type double is needed, the better solution would be
to change the type of result to double to preserve the fractional part of number. The
28 1 Input/Output, Variables, and Arithmetic
round method is one of the many methods available in the Math class which is discussed
in more detail in Sect. 1.8 on arithmetic statements.
1.6 Output
1.6.1 Text-based
Recall from Section 1.3 that the following:
System.out.println("Hello World!");
output the following:
Hello World!
_
where the cursor appeared on the next line. However, what if one wanted to split the string
so that it appears on two separate lines? This can be accomplished by using two separate
System.out.println statements as follows:
System.out.println("Hello");
System.out.println("World!");
As one might suspect, the output would appear as follows:
Hello
World!
_
The string "Hello" is output and the cursor moves down to the next line. Then, the
string "World!" is output, and again the cursor moves down to the next line in
preparation for the subsequent line to be output.
In another example, what if one wanted to output the following with a blank line
between the two words and the cursor at the bottom?
Hello
World!
_
The first statement outputs the word Hello and moves the cursor down to the second
line. The second statement does not output anything, so the ln of the
System.out.println statement causes the cursor to move down to the third line and
the blank line to appear on output. Lastly, the word World! is output and the cursor moves
1.6 Output 29
down to the fourth line. Note that usually a System.out.println() indicates that a
blank line will be output, but there are exceptions that are discussed further in Appendix
A.
Although the above is useful for outputting strings and vertically formatting output, how
does one output integers and real numbers? Combining the information learned in the
previous two sections, one can then have a program as shown in Fig. 1.6.
This program declares the variable num to be of type int, assigns the value 5 to num,
and then outputs the contents of the variable num. Note that the variable num is not
enclosed in quotation marks, so the word num is not output, but rather the contents of the
variable num are output. Unfortunately, only the integer 5 would be output to the screen
which would not be very useful. Instead, it is helpful to output some other information for
the user to identify and understand the information on the screen.
The output statement in the program in Fig. 1.6 can be modified to include the string
"The number is " followed by a plus sign prior to the variable num as shown in Fig.
1.7. A plus sign between two strings or between a string and any other type of data means
concatenation. In other words, the string "The number is " and the contents of num
are output as if they are one string. It should be noted that one needs to be careful should
only two integers be separated by a plus sign, because then it would mean addition as will
be discussed in Sect.1.8. However, provided a string or a concatenated string appears to the
left, then the item to the right of the plus sign will be concatenated instead of added. Note
that there is a space within the quotes at the end of the string so that the contents of the
variable num are separated from the word is in the string. The result is that the output of
this program would appear as follows:
The number is 5
_
What happens if one outputs a number of type double using the same format shown
in Fig. 1.7? For example, Fig.1.8 outputs the contents of the variable num of type double.
As will be discussed further in Sect.1.8, the / means division and num will take on the
value of one third. When the above program is compiled and executed, the screen displays
The number is 0.3333333333333333
Although using high precision is necessary during computation, it may not be needed
when a number of type double is displayed. How can one limit the number of digits after
the decimal point in a floating-point number? A predefined method in the Java API called
printf can be used. The general syntax of the printf method is as follows:
where control string is a string that may consist of substrings and format specifiers
and an expr represents a variable, expression, or constant value. A format specifier
indicates how an expr should be displayed. A specifier %d is used for a decimal integer,
%f for a floating-point number, %c for a character, and %s for a string. For numbers, the
total width and precision can be indicated in a specifier. For example, the specifier %10d
outputs an integer value with a width of at least 10. The specifier %10.2f outputs a
floating-point number with a width of at least 10 including a decimal point and two digits
after the decimal point. The width of character and string values can also be indicated. For
example, the specifier %3c outputs a single character and adds two spaces before it, and
%10s outputs a string with a width at least 10 characters. If there is more than one expr
to be output, they must match the specifiers within the control string in order, number, and
type. Using the formatting information described above, the program in Fig. 1.8 can be
rewritten as in Fig. 1.9.
Fabiola told Stern of pills that would take him through the night and
said he would arrange space at the home for the following morning.
Stern awakened blinking to an agonizingly warm and lovely summer
day. But the summer fragrance unsettled him; on such days his son
would have to stand without playmates, sucking a blanket on a
barren lawn, and Stern would at some point have to stand outside
and perhaps see the man a mile down the road. Dark and dreary
weather made Stern rejoice, because on such days there was no
shame in staying inside the house, where it was safe. Down deep at
the center of him there was a small capsule of glee that he was
going to the home on this day; if dark and terrible things happened
then to his family, he could not be held responsible. How could he
prevent them if he was away in a home?
The midnight driveway kiss nagged at him now, and he reached for
his wife as though to nail her down, to stake a claim in her during
his absence, to mark her, change her in some way so there would be
no smoothly coordinated backseat tumbles with José during his
absence. She watched him like a great-eyed fourth-grade girl, but
then her eyes closed, her skin became cold, and she clung to him
with a nervous, clattering whimper, doing a private, rising-up kind of
thing. He went at her with a frenzy, as though by the sheer force of
his connection he could do something to her that would keep her
quiet and safe and chaste for two weeks, but when he fell to the
side he saw with panic that she was unchanged, unmarked, her skin
still cold and unrelieved.
"Can you be a man again, my darling?"
"No," Stern said. "I've got something inside me. I've got to get up to
that home. Listen, can you give up that ballet thing when I'm
away?"
"No, I don't want to. It's the first thing I've had."
"OK, then," he said. "But no more tongues. Can't you drive home by
yourself?"
"He drives the students home. The kissing is just a show-biz thing.
Can't you be a man one more time? I'm going to have to jump on a
telephone pole."
"I don't want you to say things like that," said Stern.
Outside, on the lawn, it occurred to Stern that he had never seen his
house during the week at this precise time of day. It was eleven in
the morning, a time when he was usually at work for two hours. He
had gone to work on schedule for many years, and in his mind he
had felt that if he ever stopped and stayed home one day, or left his
job entirely, he would die. And yet here he was, standing on the
lawn, looking at his home, and he was perfectly alive. Perhaps that
was it, he thought; perhaps all he had to do was to stop work for
one day and see that he could live and he would not have gotten the
ulcer. His son came out and said, "How long will you be away?"
"A little while," Stern said.
"I can't wait for a little while," the boy said.
"I'll be back soon."
"I can't wait till soon. Listen, do you know where we are?"
"Where?" Stern said.
"In God's hand; right on his pinkie, as a matter of fact."
"Who teaches him God things?" Stern said to his wife.
"The baby-sitter. She's inside."
Stern said, "She shouldn't." He wanted to go inside and tell her to
discontinue the God information, but he was afraid she would come
after him one night with a torch-bearing army of gentiles and tie him
in a church.
Stern's wife drove the car, and as they passed the man's house
down the street Stern ducked down and made himself invisible, as
though he did not want the man to know of his triumph. Stern was
certain that if the man knew he had put Stern in a home, he would
fly a dozen flags thrillingly from every window.
On the highway, Stern watched his wife's knees, apart as they
worked the pedals; he imagined her dropping him off at the home,
then going immediately to a service station and allowing the
attendant to make love to her while her feet kept working the pedals
so that she could always say that she had driven all the way home
without stopping. She pulled into the driveway of the Grove Rest
Home in the late afternoon and Stern, saying goodbye, squeezed her
flesh and kissed her through her dress, as though by getting in these
last touches he could somehow ward off the gas station attendant.
Part Three
A giant picture of a somber, bewhiskered, constitutional-looking
man hung in the reception lobby. Stern took this to be Grove himself.
The lobby was a great, darkened, drafty place, and as Stern passed
the picture he instinctively ducked down a little, certain that Grove,
in setting up the home, had no idea people such as Stern would be
applying for admission. As Stern stood before the reception desk he
expected an entourage of Grove's descendants to run out with
clenched fists and veto him.
A tiny, gray-haired nurse looked up at him and said, "What can I do
for you, puddin'?" Stern told her who he was.
"Of course, dumplin'," she said, checking her records. "You're the
new intestinal. I'll get Lennie out for you. Does it hurt much?"
Stern said he'd had a bad night and asked what the rate was. She
said three dollars a day. "That includes your three meals and your
evening milk and cookie."
Stern had been ready to pay ten dollars a day and felt ashamed at
getting it for so little. She said, "Everyone pays the same rate, crumb
bun," and Stern said, "I'll donate a couch later when I get out."
A tall, handsome Negro with powerful jaw muscles came out on
steel crutches, moving slowly, adjusting clamps and gears as he
clattered forward. He was pushing a baggage cart, and he threw his
legs out one at a time behind it, as though he were casting them for
fish.
"This is Lennie," said the nurse. "You'll like him. He's a sugarplum.
Lennie, this is Mr. Stern, your new intestinal."
"Very good," said the Negro. "Bags on the cart, Mr. Stern. Patients to
the left of me as we walk."
"I can handle them," said Stern. The Negro's jaw muscles bunched
up, and he said, "Patients to my left. Bags on the cart."
Stern, afraid of his great jaw muscles, tossed his bags on the cart,
and the Negro began to clatter forward, clamps and gears turning,
leg sections rasping and grinding out to the side, one at a time.
Stern fell in beside him, hands in his pockets, feigning a very slow
walk, as though he, too, took days to get places.
"Are you originally from New York?" Stern asked. "I just came from
there and it's funny, but the last guy I saw was a Negro artist friend
of mine."
"There'll be no dinner," said the Negro, sweat shimmering on his
forehead as he pushed the cart, looking straight ahead. "That's at
five. You're late for milk and cookie, too. One lateness is allowed on
that, though. Did the nurse furnish you with milk and cookie?"
"No," said Stern.
The Negro's jaw muscles tightened again, and he glared violently at
Stern. He released the cart, turned around after much shifting and
switching of gears, and began to make his way back to the nurse.
Stern walked several steps behind him. When the Negro got back to
the reception desk, he asked the nurse, "Did you give this intestinal
milk and cookie?"
"No, I didn't, old stocking," said the nurse.
"That's what he claim," said the Negro, freezing Stern with another
glare. Once again he shifted gears, arranged clamps, tugged and
yanked at elaborate mechanisms, and finally turned and walked
complicatedly down a dark ramplike hall, Stern falling in beside him.
The darkness was dropping swiftly; parallel to the ramp and off in
the distance were the blinking fights of a building that seemed to be
set off by itself, deliberately isolated. Crowd sounds were coming
from it, as though from a bleachers group that had remained long
after a ball game.
"Is that where were going?" Stern asked the Negro.
"You're not to go there," he said. "That's Rosenkranz, where mentals
are to be taken. And you're not to be social with attendants at
Grove, such as myself."
He looked straight ahead as he took his zigzagging, clanking, spastic
steps, and Stern was somehow convinced that this man was doing
the most important work in the world. That there was nothing of
greater moment than being the attendant for intestinals and being in
charge of baggage carriers. Despite his complicated legs, he seemed
a terribly strong man to Stern, who felt that even were he to flee to
the Netherlands after a milk and cookie infraction, getting a fifteen-
hour start, the Negro would go after him Porgy-like and catch him
eventually. He wondered if somehow he might not be able to enlist
the Negro and his great jaw muscles to fight the man down the
street. He saw the man knocking the Negro down seven or eight
times and the Negro disgustedly wiping off his clean intern's jacket,
making clamp and gear adjustments, and then, handsome face
serious and determined, great jaw muscles bunched, coming on to
squeeze the life out of the kike man's throat.
They came finally to the end of the ramp and to a two-story
dormitory, which Lennie identified as Griggs. He pointed to a room
right inside the entrance and said, "One is not ever to enter the staff
room. There is to be a line outside for medicines and, later, for milk
and cookie. There'll be no leaving the grounds either; otherwise,
strict penalties will ensue."
Stern's room was on the second floor. It took double the usual
number of gear shiftings and fastener slidings for the Negro to
mount the stairs, and when he was up there his jaw muscles were
lumped enormously and his white intern's jacket was soaked. Stern
said, "Thank you for all your trouble," and the Negro, after opening
the room door, said, "One is to obey all rules here on the premises."
Stern's room was long and thin and rancid, as though aging
merchant marine bosuns with kidney difficulties had spent their lives
in it. A small middle-aged man with a caved-in chest and loose
pouches under his eyes sat on one of the two beds in the dim light
and said, "Hey, what's this?"
"What?" asked Stern.
The man had arranged his hands in a tangled way, as though he
were scrubbing them, and was holding them against a lamp so that
a clumping, knobby shadow showed against the wall.
"I don't know what that is," Stern said.
"See the dingus? See the wang-wang?"
"What do you mean?" Stern asked.
"You know. It's sexeroo. Screwerino."
Stern looked at the shadows again and, as the man manipulated his
fingers, Stern thought he could make out a rough picture of a pair of
sexual organs in contact.
"That's pretty good," Stern said.
"Check these," the man said, pulling a medallion out of his T-shirt
and beckoning Stern closer. Stern looked at it, a carving of a lion and
a deer, which turned into a pair of male and female genitals when
tilted at an angle.
"See the dingus? Can you see the wang-wang? You want to hold it
and fool around with it awhile?"
Stern actually wanted to get a better look at it, but he said, "No,
thanks. I'm just getting in here and I want to take it easy. I'm going
to just lie down and not do anything for a while."
"I got that last set from a guy carved them in prison. Listen, do you
want me to do another one on the wall? I can do blowing."
"I just want to lie down here," said Stern, "and take it easy the first
night. I have some things on my mind."
Stern got down on the bed and thought again about the man down
the street. He imagined coming home and finding out that the man
had moved away, unable to make his mortgage payments. Or that
he had developed a lower-back injury, so that the least motion
would cause him agony. Stern saw himself running over with
extended hand and showing the man that he would not take
advantage of him, that he would not fight him in his weakened
condition, that Jews forgive. He wanted opportunities to
demonstrate that Jews are magnanimous, that Jews are sweet and
hold no grudges. He pictured the man's boy falling down a well, and
Stern, with sleeves rolled up, being the first to volunteer to work day
and night digging adjacent holes to get him out. Or the man's child
being stricken with a rare disease and Stern anonymously sending
checks to pay the medical bills but somehow letting the man know it
was really Stern. And then he saw himself and the man becoming
fast friends from that point on, Stern inviting him in to the city to
meet Belavista, showing the man he didn't mind his work clothes.
But mostly he wanted the back injury, and clenched his fists and
squeezed his eyes hard, as though just by straining he could make it
happen. If only there was a way, he thought, that he could pay to
make it happen—even a large figure like $8,000, which he would
work off at $10 a week.
His room-mate asked, "Do you mind any farting?" And Stern said, "I
don't have any views on that."
"I cut loose a few," said the man, "but I wanted to ask, because I
know a lot of the younger ones object."
The room was thick with the smell of merchant marine sheets, and
Stern sat up, touching his stomach to see whether it had gotten any
better since he had come to the home.
"I've got something in here and I wonder how long I'm going to
have to take to get it out of here," Stern said.
"I've got the weakness is all that's wrong with me," said the man.
"I've had it ever since I left the circuit. I did comedy vignettes. I
used to get fifty-two straight weeks in those days, but snappers
killed me off and I can't work any more. You see, I never used many
snappers, maybe three a night. What I'd do is work around m'crowd,
futz them along a little, nurse them, slowly giving them the business,
and then, maybe after twenty minutes, I'd come in with m'snapper.
I'd use maybe three a night, four tops. Nowadays the new ducks
throw them out a mile a minute, no futzing in between, just one
after another. Anyone who books you wants you to shoot out a
million snappers before he'll even consider you. Well, I just couldn't
change my style, and now I've got the weakness."
"I don't know what to say to any of that," Stern said. "I'm just here
to get rid of something I've got in here."
"Suck what?" said the man.
"What do you mean?" asked Stern.
"That's one of them. One of my old snappers. I'd ask a Saturday
night bunch if they had any special song requests, and when they
hollered out a few, I'd take my time, do a little business with m'feet,
and then say to them, 'Suck what?'"
The room seemed to have gotten narrower, and Stern was afraid
that someone would seal him in with the merchant marine sheets
and the old actor.
"I'm just going to go out and get the feel of the place," Stern said,
getting up from the bed.
Stern walked outside in the hall and got his first look at the half
man. Starting with his neck and going all the way down his body,
about half had been cut away. In the shadows, with a handkerchief
around his neck and a violin in his hand, he made a beseeching
sound at Stern. His voice seemed to come from some place a foot
away from him and sounded like a radio turned on a little too loud
and tuned in to a small, dying station in New Jersey. Stern walked
ahead, his face frozen, as though he did not see the man, and on
the way down the steps he heard an off-key violin melody played
with sorrow and no skill, muffled by a closed door. Stern wondered
whether at some future date, when halves started to be taken out of
him, he too would be farmed off to a home to sit unloved in the
shadows and play a tortured violin.
Downstairs on the front porch a scattering of people talked beneath
a great insect-covered bulb. An old man, gray-haired, draped over a
wooden banister like a blanket, winked deeply and called Stern
forward. In the weeks to come, Stern was to see him clinging insect-
like against poles, draped over rails, propped up against walls, but
never really standing. Whenever the people at Griggs moved
somewhere as a unit, to meals or to the outdoor stadium, the
strongest would always carry Rooney, who weighed very little, and
see that he was perched or propped up or laid comfortably against
something. His main concern was the amount of money great people
had or earned, and his remarks were waspish on this subject. He
poked Stern in the ribs and said, "Hey, the President don't make
much dough, does he? I mean, he really has to hustle to scrape up
cigarette money." He chuckled deeply and, poking Stern again, said,
"You know who else is starving to death? Xavier Cugat. I mean, he
really don't know where his next cuppa coffee's comin' from." He
became convulsed with laughter. "He goes to one of them pay
toilets, he's got all holy hell to scare up a dime. Jesus," he said,
choking with laughter and poking Stern, "we wouldn't want to be in
his shoes, would we? We sure are lucky not to be Cugie." He started
to slip off the rail and Stern caught him and propped him up again.
"Thanks, kid," said Rooney. "All them guys are starving, you know."
A tall, nervous, erupting teen-age boy was on the porch, pushing
back and forth in a wheelchair a Greek youth who Stern learned had
had a leg freshly cut off in a street fight. A blond nurse with
flowering hips passed by and the Greek boy said, "The last day I'm
going to jazz that broad. They're going to let me out, see. That's
when I tear-ass up the steps and catch her on the second floor and
jazz her good. I going to jazz her so she stays jazzed."
"Where are you tear-assin'?" said the tall boy. He combed his blond
hair nervously with one hand as he pushed the wheelchair. "You got
one leg gone."
"Shut up, tithead," said the Greek boy, concentrating hard. "I jazz
her. Then they come after me and I cut out to Harlem. I cut out so
they never find me."
"Where you cuttin'?" asked the tall, nervous boy. "You can't cut
nowhere."
"You're a tithead," said the boy in the wheelchair.
Stern approached the pair and the tall, blond boy said, "How are
you, fat ass? Jesus," he said to the boy in the wheelchair, "you ever
see such a fat ass?"
Stern smiled thinly, as though this were a great joke and not an
insult.
"I've put on a little weight because of something I've got inside me,"
he said. "It certainly is a lovely night."
The tall boy erupted in violence. "You trying to be smart or
something?"
"What do you mean?" said Stern in panic.
"Talking like that. You trying to make fun of us?"
"Of course not," Stern said.
"What did you say lovely for? We're just a bunch of guys. The way I
see it, you think maybe you're better than the rest of us."
"It's just a way to say something, is all," said Stern.
The boy was a strange mixture, exploding with rage one minute and
lapsing into a mood of great gentleness the next. The latter quality
took over now, and he began to pour out his thoughts, as though he
might never have another chance to talk to someone so smart he
used "lovely" and wasn't even showing off. It was as though the
occasion called for conversation only on the highest level.
"I've got bad blood," he said, the violence gone. "I couldn't get into
the Army with it. I work on high wires, you know. I'm the only one
who don't use a safety harness. You know, I'll just swing from one
wire to another. The guys see me, they flip out. I'm not afraid of
anything. You get killed; so what? Then my blood gets lousy and I
have to stay in bed three months, six months, I don't care. I just like
to have freedom. A bunch of us guys was sitting around at Coney
Island eating a plate of kraut and the man comes over and says it's
time to close and takes away my plate of kraut. He didn't say it nice
or anything. Right away he's stepping on our head. So we really give
it to him and run the hell out of there. I hit him with the whole table.
"But you see what I mean?" he said with an overwhelming
tenderness, as though Stern were his first link with civilization and
he wanted Stern to interpret his position before the world. "A guy
has to have freedom. The whole trouble with everything is that
there's always somebody stepping on your head when you're eating
a bowl of kraut."
"Sounds pretty reasonable," said Stern.
"Are you sure you're not trying to show us up?" the boy said,
erupting again and taking Stern by the collar.
"No," Stern said, imagining the boy hitting him with a table.
"You're all right," the boy said, the gentleness returning. "I'll bet the
only reason you have a fat ass is because you're sick, right?"
"That's why," said Stern.
"Maybe one night—George, you, and me—we all go downtown to
get some beers."
By sliding and slipping from railings to banisters, Rooney had
attached himself to a pole close to the trio. "You know who don't
have a pot to piss in?" he said. "The guys who run this place. They
don't eat good at all, do they?" he said, chuckling deeply and
clinging to the pole like a many-legged insect.
The little staff room inside the front door lit up now, and from
within, behind a counter, the Negro attendant said, "Line up for
bandage and pill. Staff quarters are not to be entered."
The porch people lined up outside the staff room, Rooney sliding
and clinging along as the line moved. The old actor had come
downstairs and was standing alongside a dark-haired woman with
sticklike legs and a thin mustache. Her head was covered with a
kerchief and she tittered shyly as the old actor whispered things into
her ear. He was very courtly toward her, making deep, gallant bows,
and Stern wondered whether he had shown her any medallions.
Stern stood at the end of the line next to a paunchy, middle-aged
man who introduced himself as Feldner. "You're an intestinal, I hear,"
the man said. "I had what you had, only now I'm in here worrying
about something else. You're a pretty smart boy. I heard you say
lovely to those kids. What do you do?"
"I write labels for products," said Stern.
"I worked the casinos all my life," said the man. "All over Europe,
lately the Caribbean. But I was always betting on the wrong rejyme.
I'd put my money on a rejyme, see, and then I'd be working a table,
making my three clams a week, when bingo, a plane flies over, drops
a bomb, and we got no more casino. Once again Feldner's got his
money on the wrong rejyme. One rejyme in South America give me
an ulcer, what you got. But now I'm worrying about something else.
How'd you like to write a book about a guy who always bet his
money on the wrong rejyme?"
When Stern's turn came, he saw that the Negro, inside the staff
room, had taken off his intern's jacket. He had great turbulent
shoulder muscles, and Stern wondered what his legs looked like, all
fitted up in their contraptions.
"Bullet got me in the high ass region," he said, his back to Stern,
preparing Stern's medication. "Pacific. It pinched off a nerve and
caused my legs not to move."
Stern welcomed the sudden intimacy and said, "You get around fine.
I never saw anyone handle things so smoothly. When I was a kid, I
used to go up to the Apollo on Amateur Night in Harlem. You'd see
some really fine acts there. That's where Lena started, and Billy
Eckstine." He put his foot inside the door and the Negro turned
swiftly, jaw muscles pumped up with rage, and said, "There is not to
be any entering of the staff room."
Stern said, "All right." He was the last one in line, and when he had
swallowed his medicine, the Negro lowered the staff-room light and
Stern went upstairs. On the top step the half man was waiting for
him, a bandage around his neck. As Stern approached, he flung
open his bathrobe in the shadows and said, "Look what they did to
me," his voice coming from a static-filled car radio on a rainy night.
Stern pushed by him, making himself thin so as not to touch him,
closing his eyes so as not to see him, not daring to breathe for fear
he would have to smell the neck bandage. He got into his narrow
room and shut the door tight and wondered whether the half man
would wait outside the door until he was sleeping and then slip into
bed beside him, enclosing the two of them in his bathrobe. The old
actor was wheezing deeply and Stern got between the damp
merchant marine sheets, wondering whether Fabiola hadn't made a
mistake in sending him to this place where he had to look at half
men, as though to get a preview of horrors in store for him. He
touched his middle and, disappointed that the great globe of pain
still existed, began to pat it and knead it down, as though to hurry
along the treatment. As always, his last thoughts before dropping off
to a nightmare of sleep were of the man down the street. It struck
him as unfair that no matter how many pills he put inside his
stomach, no matter how gently he rubbed and patted it, no matter
how healthy he got at the Grove Rest Home, he would still have to
go home and drive past the man's house twice a day. The man
would still be there to start Stern's belly swelling again. How unfair it
was. Couldn't bodies of medical people be dispatched to tell the man
that Stern was receiving treatment, was getting better, and he was
to leave him alone and not bother his wife and child, otherwise Stern
would crack with pain once more? Bodies of medical people with
enforcement powers. Couldn't Grove send a group of envoys of this
nature on ahead of him before he got home, so the man would
know?
Stern awakened the following morning to a sweetly cool summer
morning, and waiting to welcome him was the actor, standing
barefooted in a great tentlike pair of old actor's underwear, sequined
in places, gathering the folds of it into his stained pants, and rubbing
his meager arms.
"Got to get the pee moving," he said. "What did you think of my
doll? That's good stuff, boy. Gonna get me some of that stuff."
Stern said she was very nice and dressed quickly. The old actor, still
rubbing his arms, said, "You ought to try this. Nothing like it to get
your wang-wang in shape."
Downstairs, on the porch, the Griggs people stood around silently in
the dewy morning, and when Stern and the actor arrived, they all
began a dumb march to the dining room, a broken parade led by the
tall, erupting boy with the boneless, insect-like Rooney in his arms.
Carrying Rooney was a privilege that went to the strongest of the
group. After them came the Greek boy, wheeling along furiously,
saying, "Wait up, fuckers," and then the main body, followed finally
by the half man, old-fashioned toothache towel around his neck,
radio-croaking to the wind. In the dining room he took a table by
himself. Stern sat with Feldner and a small, scowling man who kept
invoking the power of his labor union. He tried a roll, found it hard,
and said, "I don't have to eat a roll like that."
"Why not?" Stern asked.
"I belong to a powerful union."
Later, when his eggs were served, he said, "Union gets you the best
eggs in the country."
Stern ordered some cereal. When he took a spoonful, Feldner
stopped his hand and said, "You can't eat that."
"How come?" Stern said.
"Not in the condition you're in," he said. "I had what you got. You're
a nice kid, but it would tear you up."
"I get to eat cereals," said Stern. He buttered some bread and
Feldner said, "Are you trying to commit suicide? I told you I had
what you got. I been all over the world, in every kind of country.
You're in no shape to eat that."
"I have a different kind of doctor," Stern said, eating the bread but
wondering whether Feldner's doctor wasn't better than Fabiola.
"There's only one thing you can eat with what you got," said Feldner.
"What's that?" Stern asked.
"Hot stew. The warm is what you need. It warms you up in there
and heals everything up. The way you're eating, you're dead in a
month."
"I have a doctor who says bread and cereal are all right," Stern said,
but the pain ball seemed to blow up suddenly beneath his belt and
he wondered whether to call Fabiola and check on stew.
At the next table, the old actor made courtly, charming nods at the
mustached stick woman. When she turned to blow her nose, he
stuck a fork up through his legs, poked Rooney, who clung to a chair
next to him, and said, "Hey, get this wang-wang."
At Stern's table the sullen, scowling man said, "They don't take
oddballs in my union. Any crap and out you go." Finishing his meal,
Feldner patted his lips and said, "You better be careful, kid. I know
what you got in there. You can't go eating shit. You get the hot of a
stew in there and you'll see how nice it feels. I know. I'm worrying
about something else, but I had what you got."
At the meal's end, the half man, who had sat alone, eating swiftly
and furtively, got to his feet and began to gather everyone's dirty
dishes and stack them in piles.
"It's always the worst ones who are the nicest," said the plump
dining-room waitress. "It was that way at Mother Francesca's, too."
Stern had been aware of the half man eating alone, had felt his
eyes, and at one point had been compelled to go and sit with him,
staring right at his neck bandage and saying, "Don't worry. I'll sit
with you. In fact, I'll stay with you until the last half is taken away."
He felt that maybe if he sat with the half man, someone would sit
with him later, when he himself began losing halves. But on his way
out of the dining room, when the half man looked up at him, he ran
by frightened, as though he didn't see him.
Outside, the old actor grabbed him and, pointing to the mustached
woman up ahead, whispered, "I'm going to get me some of that.
That's real sweet stuff. You got to work it slow when you're handling
one of them sweet dolls."
Stern stayed five weeks at the Grove Rest Home, and during this
period the pain balloon that had crowded tight against his ribs began
to recede until he was able to fasten the snaps of his trousers
around his great girth. On some mornings during these weeks he
would awaken and for an instant feel he was at the New Everglades,
a mountain resort where he often spent summers as a child with his
mother. Those summers days he would get up early and run down to
cut a purple snowball flower for his mother to wear, wet and
glistening in her hair, at the breakfast table. They were lazy, wicked
times, and since he was the only young boy at the resort, he spent
them among young women, playing volleyball with them, doing
calisthenics, and staring fascinatedly at the elasticized garments they
kept tugging at as the material crept below their shorts line.
Afternoons he would lie in the bottom of a boat while his great-
breasted mother, wearing a polka-dotted bathing suit that stared at
him like a thousand nipples, rowed across the narrow resort river to
the hut of a forest ranger who lived in the woods opposite the resort
all year long. Stern hunted mussels in the shallow river water
alongside the hut, and when his mother emerged from the hut she
would say to him in the boat, "A hundred girls at the hotel and I'm
the only one can make him." To which Stern answered, "I don't want
to hear anything like that." Later, in the afternoon, Stern would sit at
the resort bar with his mother, taking sips of her drink while his
mother told the bartender, "That doesn't frighten me. I'll give him a
little drink at his age. It's the ones that don't get a little drink from
their mothers you have to worry about."
The men around his mother at the bar told dirty jokes to her, and
one afternoon one of them, holding his palms wide apart and
parallel, said, "Baby, my buddy here has one this long, so help me."
His mother folded up with laughter on her barstool, and Stern,
suddenly infuriated, hit the man in the stomach to protect her. His
mother pulled him back and said, "You can't say things to his
mother. He'll kill for her." Later, getting ready for dinner, Stern's
mother would take him into the shower with her and he would stare
at the pathetic, gaping blackness between her legs, filled with a
terrible anguish and loss. Then he would rush down to cut another
flower for her and, in the coolness of the evening, begin to feel very
lush and elegant, as though no other boy in the world was having as
wicked and luxurious a time as he, the only boy in a grown-up
resort. His mother would tell him, "You're growing up too fast. You
know more than kids ten years older than you." And later in the
year, at school, Stern would tell his friends, "Boy, do I know things.
Did I see things this summer. My mother isn't like other mothers.
She just doesn't go around acting like a mother." And yet, with all
the panty glimpses on the volleyball court and the barroom sips of
drinks, the dirty jokes and the nervous showers, what did he actually
know? It remained for a busboy in back of the resort kitchen to tell
him about the sex act. Stern couldn't believe the actual machinery
and said, "Really?" and the busboy said, "Yeah. When you put it in
them, they get a funny feeling up their kazoo."
The Grove Rest Home had the sweet summer coolness and the
proper fragrance, but it was a parody of a resort, with all its facilities
torn and incomplete. Stern heard there was a small golf course and
borrowed clubs one morning, setting out to look for it. He tramped
the length of the institution and finally spotted a flag in the center of
some tall weeds far beyond the kitchen. A bald man with a thick
mustache stood alongside the single hole of the golf course, hands
locked behind his back, puffing out his cheeks and flexing an
artificial leg in the style of a British colonel surveying a battlefield.
He said he was an electrician. A hot wire had fallen on his leg and
sheared it off. His main difficulty had been in dealing with his grown
son, who couldn't get used to having a one-legged father. "I told him
you get older, these things happen, but he wouldn't buy it and kept
spitting on the floor." The man spoke with a thick Brooklyn accent,
but when he was silent, flexing his leg, he took on an amazingly
autocratic demeanor, a British colonel once again. "Are you playing?"
Stern asked him. "No, I'm just standing next to the hole here."
The golf course was a broken, one-holed, weeded one, and Stern's
days at the Grove Rest Home seemed weeded and broken, too.
There were no scheduled activities, and between meals Stern passed
the time in the library, reading peripheral books, ones written by
people who had been close to Thomas Dewey and others about
Canada's part in World War II. The only newspaper available was a
terrible local one devoted almost entirely to zoning developments,
but Stern waited for it eagerly at the front door each night, pacing
up and down until it came. He looked forward, too, to "milk and
cookie" each evening at seven, which was the nearest thing at the
Home to a special treat. One night, when he was in line for his
refreshment, the mustached woman squatted down on the front
porch and began to urinate, throwing her kerchiefed head back and
hollering, "Pisscock, pisscock." Gears clanking and grinding and
seemingly slower than ever, Lennie came out from the staff room
and made for her, finally getting there and carrying the woman,
screaming, up to her room. Later, Stern learned she had been taken
to Rosenkranz. In the room that night, the old actor said, "I really
liked that doll. She was sweet stuff, I mean really sweet. Too bad
she got the mentals. When she gets out of here, I'm going to get me
some of that stuff, you wait and see."
Most of the climactic events at Grove seemed to take place on the
porch during "milk and cookie." Another night, the scowling union
man, two places ahead of Stern, fell forward and died. The patients
made a circle around him, as though he were "it" in a sick game,
and Rooney hollered, "Give him mouth-to-mouth." Afraid he would
be called upon to do this, Stern said, "I'll get someone," and ran
wildly into the field beyond the building, making believe he was
going through the proper procedure for handling recent deaths. He
came back after a few minutes to look at the union man on the floor.
It was the first dead person Stern had seen, and the man did not
look sweet and peaceful, as though he were asleep. He looked very
bad, as though he had a terrible stomach-ache. No one had done
anything yet, and the half man was now standing in the circle,
croaking, "See what happens. See." It was as though he was
allowed to stand with the others only on occasions such as this, a
thing he knew all about. Finally Lennie arrived, stern and poised,
and leaned over the man. "This is a death," he said coolly, and Stern
thought to himself, "Why did Fabiola send me here? How can I
possibly be helped by seeing guys dying and half men? He made a
mistake."
Yet, despite the wild urination and the curled-up dead man, Stern's
pain diminished gradually. Sometimes, when he sat in the fields on
endlessly long afternoons, waiting for the days to pass, he would
probe his middle cautiously, as though he expected to find that the
ulcer had only been playing dead and would leap out at him
suddenly, bigger than ever. But the circle of pain had grown small
and Stern thought how wonderful it would be if the kike man was
getting smaller too, if when he got back to his house, he could find
the man completely gone, his house erased, all traces of him
vanished, as though he'd been taken by acid or never existed.
One morning, late in Stern's stay, word spread that two industrial
teams were coming to play baseball for the patients at the Home.
There was much excitement, and Stern felt sorry for those shriveled
people whose only fun had been at YMCA's and merchant marine
recreation parlors. Not one had ever seen My Fair Lady, and it was
small wonder they looked forward with such delight to a clash
between two industrial teams. In early evening, the night of the
game, Stern took his place in the dumb march formation and walked
to the field, poking his belly and feeling around for the pain flower. It
had been replaced by a thin, crawling brocade of tenderness that
seemed to lay wet on the front of his body and was a little better
than the other. But he wondered whether the ulcer might not roll
forth in a great flower once again, at the first trace of friction, and
then he would have the two, the flower and the brocade. He was
aware that in just a few days he would have to go back to the kike
man. What would happen if he merely drove by once, saw the man's
great arms taking out garbage cans, and felt the flower instantly fill
his stomach, one glimpse wiping out five weeks at the Grove Rest
Home? And what if it went on that way, five weeks at Grove, one
glimpse at arms, another five weeks at Grove, arms, until one day
the flower billowed out too far and burst and everything important
ran out of him and there was no more?
Stern walked behind the tall, sputtering, explosive boy, who led the
march with Rooney in his arms. "You know who we ought to take up
a collection for?" Rooney asked Stern as the Rest Home people took
seats in the front row of the small grandstand.
"Who's that?" asked Stern.
"Yogi Berra," cackled Rooney. "I understand he's down to his last
thirty-five cents." The tall boy poured him onto a bench in the front
row and he clung gelatinlike to it, saying, "That Berra doesn't make
ten bucks the whole season," and shaking with laughter. Stern sat
between the tall, erupting young boy and Feldner. The boy, who was
alternately nice and violent to Stern, asked him, "Did you ever play
any ball before you picked up all that ass fat?"
"A little bit," Stern said. "And I'm not that heavy back there." He was
afraid of the boy's sudden eruption and wondered why the boy
couldn't be nice to him all the time. Violence was such a waste. It
didn't accomplish anything. Stern had to worry that the boy would
suddenly erupt and push him through the grandstand seats, maybe
snapping his back like wood. He wanted to tell the boy, "Be nice to
me at all times and I'll tell you things that will make you smart. I'll
lend you books and, when we both get out, take you to a museum,
explaining any hard things."
One of the teams represented a cash register company and the
other a dry cleaning plant, and as they warmed up, the old actor ran
out onto the field, stuck a bat between his legs, and hollered to the
grandstand, "Hey, get this wang-wang. Ain't she a beaut?" A tall,
light-skinned, austere Jamaican Stern thought might have been a
healthy-legged brother of Lennie was the umpire, and he thumbed
the actor back into the stands, saying, "Infraction," and then folded
his arms and jutted his chin to the sky, as though defying thousands.
In the stands, Feldner, in a bathrobe and slippers, shoulders stooped
from years of bending over crap tables, said to Stern, "We had
softball games when I was working under one of the Venezuela
rejymes. You know how long that rejyme lasted? Four days. I really
backed some beauties. That's how I got what you got."
Stern felt sorry for Feldner in his bathrobe, a man whose shoulders
had grown sad from so many disappointments, and wanted to hug
him to make him feel better. Once, Stern's mother, infuriated at
having her clothing allowance cut down by his father, had gone on a
strike, wearing nothing but old bathrobes in the street. This had
embarrassed Stern, who had turned away from her each time she
had walked past him and his friends. Now Stern wanted to embrace
Feldner as though to make it up to his mother for turning his back
on her saintlike bathrobed street marches.
Stern watched the men on the two teams pepper the ball around the
field and then looked at them individually, wondering if there were
any on either team he could beat up. They all seemed fair-skinned
and agile, and Stern decided there were none, until he spotted one
he might have been able to take, a small, bald one playing center
field for the cash register team. But then a ball was hit to the small
player and he came in for it with powerful legs churning furiously
and Stern decided he might be too rough, also. He imagined the
small, stumplike legs churning toward him in a rage and was sure
the little man would be able to pound him to the ground, using
endurance and wiriness and leg power.
A black-haired Puerto Rican girl came to sit with the tall, erupting,
blond boy. She helped a nurse take care of a group of feebleminded
children connected to the Home and Stern had seen her with a pen
of them, doing things slow-motion in the sun. From a distance she
seemed to resemble Gene Tierney, but up close he saw that she was
a battered Puerto Rican caricature of Gene Tierney, Tierney being
hauled out of a car wreck in which her face had gone into the
windshield. She did things slow-motion, in the style of the retarded
children she helped supervise. Sitting on the ground in front of the
tall, blond, fuselike boy, she said, "You promised we were goin'
dancin'."
"Shut your ass," the tall boy said. "Hey, you want to hear one? Two
nudists, man and a broad, had to break up. You know why? They
were seein' too much of each other."
The Puerto Rican girl giggled and leaned forward in slow motion to
tickle the tall boy. Stern saw her as a Gene Tierney doll manhandled
by retarded children in temper tantrums, then mended in a toy
hospital.
"Your sense of humor is very much of the earth," she said.
The tall boy introduced Stern to the girl. "This is Mr. Stern," he said.
"He's a swell guy, even though he's got a fat ass. I'm sorry, Mr.
Stern; only kidding. He's really a good guy. Real smart."
"Listen to this one," the boy continued. "I know a guy who was
invited out by Rita Hayworth. He was in her house at the time." The
tall boy erupted with laughter and the Puerto Rican girl tickled him
again in slow motion. Turning to Stern, she said, "He's a natural
man. I'd like to feel his energy coursing through my vitals." In the
distance, Stern had imagined her hips to be flaring and substantial,
but actually they had a kind of diving, low-slung poverty about them.
She wore a skintight blue skirt, and Stern wondered whether she
hadn't worn it for an entire year and was to wear it the next three
until poverty-stricken Puerto Rican underwear came bursting through
its fabric. Still, the combination of Latin eroticism and intellect
flashes appealed to him. It was a painful thought, and he actually
gritted his teeth as it came to him, but he had to allow it to come
through. This tattered Puerto Rican watcher of feeb kids was
probably smarter than his wife, close to what he'd really wanted.
She probably knew undreamed-of, exotic Puerto Rican love tricks. He
could bring her lovely sets of underwear, tighten up some of her
poetic allusions, and make her the perfect wife. He wished she was
tickling him instead of the tall boy. Stern smiled at the girl. He
wanted to tell her he knew better jokes, smooth situational ones,
and if only she gave him a fair chance, several days of intensive
conversation, she would see he was a better bet than the tall, corny
boy. But he felt very old and heavy and was unable to speak.
"Got another," said the sputtering, fuselike, blond boy. "Would you
rather be in back of a hack with a WAC or in front of a jeep with a
creep?"
The girl dug her fingers hungrily into his ribs, saying, "You promised
we'd go dancin'."
"Eat shit," the tall boy said, brushing her aside. "You know," he said
to Stern, "I was once in bed for eight months. My kid sister took
care of me in a little room just big enough for the two of us. Every
once in a while my veins give out and I can't do anything. I don't
give a shit. You live, you live; you die, you die. Only thing I care
about is freedom and old guys not pushing you around."
The game had begun now, and the wheelchaired Greek boy had
maneuvered himself alongside the bench in the front row. He stuck
his hand under the Puerto Rican girl's dress and she cringed back
against the tall, grenadelike youth, saying, "I intensely dislike duos."
Stern wondered what would happen if he went under there, too. He
envied the wheelchaired boy. He'd gone under and nothing had
happened. He hadn't been hauled off into court.
The Greek boy stared out at the cash register company pitcher and
said, "He's a crudhead. I could steal his ass off. He makes one move
to pitch and I'm on third like a shot."
"What are you gonna do?" said the tall boy. "Crawl on your balls?"
"Shut up, tithead," said the Greek boy.
Feldner nudged Stern and said, "I used to like baseball, but there
was only one rejyme ever let us play." Then he hollered out, "Swing,
baby, swing; you can hit him, baby," as though to demonstrate to
Stern his familiarity with the game.
"See," he said, and Stern wanted to take him around and soothe him
for being a bathrobed failure who was worried about a mysterious
new something inside him.
Sitting in the grandstand now, feeling Feldner's warm, bathrobed
bulk against him, Stern, despite the tender sheet that lay wet
against the front of his body, felt somewhat comfortable and took a
deep breath, as though to enjoy to the fullest the last few days
before his return to the kike man. He was afraid of the charged and
sputtering boy on his left, afraid that in a violent, pimpled, swiftly
changing mood he might suddenly smash Stern back through the
grandstand benches. Yet, despite the grenadelike boy, Stern still felt
good being at a ball game among people he knew, broken as they
were. He had cut himself off from people for a long time, it seemed,
living as he did in a cold and separate place, and he thought now
how nice it would be if all these people were his neighbors, Rooney
in a split-level, Feldner next door in a ranch, and the old actor
nearby in a converted barn. Even the half man would not be so bad
to have around, living out his time in an adjacent colonial until the
last half was taken away. All of them would form a buffer zone
between Stern and the man down the street. That way, if the kike
man ever came to fight him on his lawn, his neighbors would gather
on the property and say, "Hands off. He's a nice guy. Touch him and
we'll open your head."
Late in the game, a line drive caught the little bald cash register
outfielder in the nose and he went down behind second base with a
great red bloodflower in the center of his face. There were no
substitute ballplayers, and the austere Jamaican umpire, flipping
through the rule book, said, "Forfeit," jutting his chin toward the
grandstand, as though ready to withstand a hail of abuse.
"I'll run that coon the hell out of here," said the wheelchaired Greek,
waving his fist. "I come to see a ball game."
"That's right," said the tall boy, pimples flaring, beginning to ignite.
Suddenly, his face softened. He grabbed Stern's collar and shouted,
"We got someone. This guy here will play. Don't mind his fat ass." To
Stern, he said, "I didn't mean that. I know you can't help it." He
turned to the Puerto Rican girl and said, "Hey, a man brings home a
donkey, see. So all day he goes around patting his ass."
The girl smiled, showing salt-white teeth with only the tiniest chip on
a front one. She lay back, putting her head on the tall boy's lap and
waggling a leg lazily, so that a gleam of Puerto Rican underwear
caught the sunlight. "Boredom and you are ever enemies," she said
to the tall boy. "Please sneak out and take me dancin'." The others
in the stands were cheering for Stern now, and he stood up, afraid
the tall boy's pimples might sputter into violence again and also not
wanting to hurt anyone's feelings. It was easy to just start trotting
out toward the field. He fully expected to turn back with a big smile
and say, "I'm not going out there. Not when I'm sick." But he found
himself jogging all the way out to center field, unable to get himself
to return. Winded, he stood in a crouch, hands on knees, as though
capable of fast, dynamic spurts after balls. He hoped the Puerto
Rican girl was watching and would see him as being potentially lithe
and graceful, equal to the tall boy. Feldner ran out in his bathrobe
and slippers and said, "Do you know what will happen to you? With
what you got? You play and you're dead in a minute and a half."
Stern motioned him back, saying, "I'm not sure I have what you
had. Everyone's got a different kind of thing." But when Feldner
turned away, discouraged, Stern was sorry he had been harsh to a
man in a bathrobe.
From the stands, Stern heard the Greek boy shout, "You show 'em,
fat ass," and Stern hoped the girl would not think of him only as a
man with a giant behind. The austere Jamaican umpire checked
Stern, looked at his rule book, said, "Legalistic," and turned stoically
toward the wind.
The second hitter hit a pop fly to short center field, and Stern, since
childhood afraid to turn his back and go after balls hit past him,
joyfully ran forward and caught the ball with his fingertips, so thrilled
it had been hit in front of him he almost cried. He did a professional
slap forward and returned the ball to the infield, wishing at that
moment the kike man was there so he could see that Jews did not
sit all day in mysterious temples but were regular and played
baseball and, despite a tendency to short-windedness, had good
throwing arms.
A sick, reedlike cheer came from the torn people in the grandstand
after Stern's catch. At the end of the inning, he trotted toward the
dugout and heard the Greek boy say, "Nice one, fat ass, baby," but
he averted his eyes with DiMaggio-like reserve and sat on the cash
register team's bench. Feldner came over in his bathrobe and said,
"What did I tell you?"
"What do you mean?" said Stern.
"Look at yourself. You should see your face."
"I look all right," said Stern. "And I'm playing now." Sitting among
the lean, neutral-faced cash register team, he was ashamed of
Feldner's bathrobed presence and motioned him away. But, as
Feldner left, Stern again regretted his curtness and wanted to shout,
"Come back. You're more to me than these blond fellows."
Stern got to bat in the inning. Afraid the dry cleaning pitcher had
discovered his Jewishness and planned to put a bloodflower between
his eyes, too, he swung on the first pitch, hitting it on the ground.
Forgetting to run, he stood on the base path and actually squeezed
with his bowels, hoping the ball would get past the third baseman.
When it filtered through the infield for a hit, Stern hollered "Yoo" and
ran to first, sending home the runner in front of him and tying the
score. His team won in that inning and the patients gathered round
him on the field. "You clobber their ass, baby," said the Greek boy
with genuine sincerity, reaching up from the wheelchair to pat
Stern's back. The tall boy, with gentleness in his lips, the ticking in
him fading, said, "No fooling, you get around good. I mean, for a
guy with a can like yours." The Puerto Rican girl, still lying on the
bench with gaping skirt, said, "We're all goin' dancin' tonight. Either
alfresco or in my place. The group has much charm." Only Feldner
had misgivings. "You signed your death warrant out there," he said,
and for a moment Stern felt a bubble tremble outward inside him;
he was certain he was going to have to pay for his indiscretion by
starting from scratch with a brand new ulcer, slightly larger and a
fraction more formidable than his first. But the bubble fluttered and
withered, like a wave breaking, and the patients kept congratulating
him. He had struck a blow for sickness. As a reward he got to carry
Rooney back to the porch for evening "milk and cookie."
Late that night, the tall, blond boy and the wheelchaired Greek came
for Stern as he sat alone on the porch. The others had gone to bed
and the tall boy said, "We're meeting the kid with the boobs on the
outside tonight. I figure we get a few beers and, later, diddle her
boobs."
"I take her upstairs and do some jazzing," said the boy in the
wheelchair.
Stern, flattered at being selected by the two, and not really sure how
to say no, got up from his chair, giddy and dangerous in the night.
The trio started down the corridor and then heard Lennie rasping
and clattering after them, a man with a machine shop going full
blast below his waist.
"There is to be no disobedience of the nighttime rules," he said, and,
as the boys turned to face him, Stern wondered which side he would
be on in a fight. He imagined Lennie standing against the wall,
looking patiently at Stern, while the tall boy bent his contraptions
and tore out his clamps and gears and the Greek boy hit him many
times on the head to no avail. Stern pictured himself watching this,
frozen to the side, asking Lennie, "Do you need any help?" And then
Lennie, his machinery mangled, finally turning from Stern with great
calm and slowly rising up, trunklike and great-armed, to hug the
breath out of the two boys, subduing them for the night.
As it was, the Greek boy merely wheeled around, saying "Coon
fucker" under his breath, and the tall boy, with great sweetness,
said, "We were just being happy with Mr. Stern for getting a hit with
a fat ass."
The two boys returned to the dormitory, and as Stern walked after
them, the Negro stopped him and said, "There can be a little staying
up later sometimes. If authorities come, though, I didn't see you."
Stern said, "Thank you," but he felt very uncomfortable about the
favor and wanted to do a thousand quick ones for the Negro. He
wanted to tell him that if he ever got into trouble with the police, he
could hide in Stern's house, or if he ever wound up helpless and
drugged on Welfare Island, Stern would go take a taxi in the middle
of the night and cut through red tape to get him into a decent
hospital. But the Negro clattered off in a metallic symphony and
Stern sat guiltily on a chair, staring off at the winking lights of
Rosenkranz. He stayed up late, sucking in the dewy air, exulting in
its freshness, aware there were only a few days before his return to
the kike man and yet thrilled that there were those few days. He
wished that he were clever enough to stretch his mind so that he
could turn those days into eternities, fondling each second,
stretching it, cramming a lifetime into it before yielding it selfishly for
the next one. Perhaps if he stayed on the porch and stared at the
night, pinned it with his eyes, he would be able to hold it there and
forever block out daylight. Across the field he studied Rosenkranz
and wondered whether at some future date he might not himself be
taken there, ulcer-free but a mindless urinator now, squatting beside
the others, filling the corridors with a giant stream and cackling at
the walls.
The following night, the three evaded Lennie and dashed drunkenly
at midnight across the lawn toward the main gate, the tall, blond
boy propelling the Greek ahead, as though the wheelchaired youth