777
Stringdata type, 126
String expressions, 61–63, 110
String literals, 158, 488
String objects, 228, 243
String operations, code segment using,
129
Strings, 53
arrays of, 497–499
comparing, 158–161
converting to numericvalues, 130
testing equality of, 161
String-to-numeric type conversion meth-
ods, 130
Stringtype, 106, 128, 129
changing value of parameter of, 243, 244
Stringvariables, 73, 86, 158
Strongly typed language, Java as, 55
Stroustrup, Bjarne, 113, 580
Structured data type, 482
Structured design, 285
Structured variables, recursive algorithms
with, 648–651
student, accessing fields of, 511
Studentclass, 188
Student object, 188, 189
StudentStatusclass, 189–190
Style.See alsoSoftware engineering tips;
Syntax
braces and blocks, 171
and changing value of parameter, 501
consistent, 141
and readability, 75
and reference types passed as
arguments, 512
Subarray processing, 501, 512, 531
by column, 589
by row, 588
Subclasses, 275, 277, 278, 279, 287, 325,
332.See alsoSuperclasses
definition of, 330
implementing responsibilities of,
346
and inheritance, 285
of Phone, 333
and protected members, 344
Subexpressions, 163, 458
Subproblems, 286, 316
Subprograms, 18, 34, 50
substringmethod, 128–129
Subtasks, 24
Subtraction operator (–), 108, 117, 141
Summing, 231–233, 235, 257
Summing operation, in income by gender
case study, 251
sumSalesmethod, 500, 501
Sum the columns, in two-dimensional ar-
rays, 586, 588–589
Sum the rows, in two-dimensional arrays,
586, 587–588
Sun Microsystems, 113
Java introduced by, 635
Superclass constructors, 365
Superclasses, 278, 285, 287, 325, 332, 337.
See alsoSubclasses
calling constructors in, 347
definition of, 330
extending, 365
extends and, 346
and hiding, 336
private member of, 345
protected field of, 344
Supercomputers, 325, 580, 581, 659
super(), 365
superkeyword, 349, 367
Swapping, 540
contents of two variables,xand y, 541
Swing applets, 661
swingpackage, 376
inheritance hierarchy for, 661
Switch expression, 438
switch statement, 431, 438–442, 440
and break statement placement, 467
double-checking long, 467
flow of control in example for, 439
as multiway selection statement, 468
omitting break statements inside of,
442
testing applications with, 466
Symbolic constant, 57
Symbolic logic, 164
Symbols, 480
for additional Java operators, 449
for logical operators, 161
and metalanguages, 43
Synonyms, avoiding use of, 102
Syntactic errors, 194, 195