773
filtering for, 402
responsibility algorithms for, 404–406
scenarios for, 402–404
Rainfallapplication, 411, 465
RainFallclass, 408, 459, 463–465
CRC card for, 404 , 460
RAM.SeeRandom access memory
RAMAC (random-access method of
accounting and control), 211
Random access memory, 20n.5
Randomclass, 672
Random-number generator, 672
Range, of floating-point types, 595
Ratliff, Wayne, 522
Readability, 141, 173, 299, 316
and code formatting, 124
and efficiency, 174
and named constants used instead of
literals, 107
and parentheses, 165
and side effects, 451
and style, 75
Readerclass, 68
Reader object, 68
Readers, and inspections, 191
readLinemethod, 68, 69, 70, 256, 498
and end-of-file controlled loops, 227
and EOL mark, 217
readObjectmethod, 356, 366
ClassNotFoundExceptionthrown by, 357
of ObjectInputStreamclass, 355
Read/write head, 21
Real numbers, 480, 481, 598
Recursion, 635, 636–638
description of, 636
examples with simple variables,
638–644
infinite, 638
iteration versus, 651–652
and power function definition, 636–637
and power function implementation,
637–638
power of, 652
tail, 650
Recursive algorithms, 636, 637, 640, 651,
653
debugging, 652
with structured variables, 648–651
Recursive binary search method, 651
Recursive calls, 635, 636, 638, 652
and debugger program, 653
and Towers of Hanoi, 646
Recursive case, 642, 648, 652, 653
determining, 640
and Towers of Hanoi, 645
Recursive definition, 636
Recursive solutions, 635, 652
and converting decimal integers to
binary numbers, 642
for factorial problem, 640, 641
Reference type parameter
effect of assigning new value to, 244
effect of changing fields of, 245
Reference types, 100, 101 , 479, 480
arrays in Java as, 486, 487
array type as, 499
assignment for, 491
and base address, 499
components as, 501
passing of, 243
Registering the listener, 385
Relational expressions, 156, 160
Relational operations, 480
Relational operators, 156–158, 193, 448,
456, 480
combining with logical operators, 161
for comparing values of arithmetic ex-
pressions, 158
with floating-point types, 167
note on confusion between assignment
operator and, 158
order of precedence for, 165
Relative error, 598
Reliable application, 252
Remainder (%), 141
removemethod, 401, 421
Representational errors, 596, 597, 603, 620,
621
and cancellation errors, 601
with floating-point arithmetic, 602
Reserved words, 47, 86, 87, 273
Reset button, 411
resetListmethod, 535, 536, 538
Responsibilities, 179, 275, 284, 285, 314,
315, 333
for address book case study, 305–307