|
safety net catch blocks, 213
Sans Serif fonts, 285–286
scalability
defined, 473
of events, 330
scientific notation
defined, 473
purpose of, 24
scope
defined, 473
in loops, 97
of methods, 68–69
scripts, 398
Scrollbar class, 312
scrollbars
creating, 312–313, 313
events from, 355–356, 356
in text areas, 310–312, 311–312
SDK (Software Development Kit), 396–397
semicolons (;)
in classpath elements, 169
in declarations, 27
in do-while loops, 86
in for loops, 87, 91
Serif fonts, 285–286
serifs, 473
setBackground method
in Button, 294
for frames, 271, 275–276
setBounds method, 325
setColor method, 277
setColorScheme method, 183–184
setEnabled method, 349
setFont method, 284–285, 294
setForeground method, 294
setLayout method, 313–314, 325
setLocation method, 325
setNumEnvelopesInStock method, 210–211
setSalary method, 175
setSize method, 272, 282, 325, 367
setters
with data hiding, 173
defined, 471
setTitle method, 271
setValues method, 183–184
setVisible method
for dialog boxes, 367
for frames, 272–273, 289, 333
SeveralObjectsLab animated illustration, 123–125, 125
shifting operations
defined, 473
process, 42–44, 42–44
ShiftLab animated illustration, 43–44, 44
short-circuit operators
in Boolean operations, 49–50
defined, 473
short data type
range of, 21
with result types, 52–53, 53
wrapper class for, 240
ShowButton class, 293
ShowMeATrace class, 207
side effects
defined, 473
with methods, 64–65
signed integer types
defined, 473
summary, 21
SimCom computer, 5–8, 6
benefits of, 11–12
working with, 8–11, 9
Simple Base 2 animated illustration, 21–24, 22–23
Simple Event Lab animated illustration, 336–339, 336–339
Simple Exception Lab animated illustration, 203, 204
Simple Input Lab animated illustration, 255, 256
Simple Output Lab animated illustration, 252, 253
SimpleActionListener class, 334
SimpleChoice class, 302
SimpleFlow class, 314–315
SimpleNim class, 342–351, 342–344, 346, 349
sin method, 243
single-line comments, 36
size
of arrays, 103–105
of canvas, 380
of dialog boxes, 367
of fonts, 284
of frames, 272
with layout managers, 314, 317
of strings, 233
slashes (/)
for comments, 36
in compound assignment, 51
for division, 37
Software Development Kit (SDK), 396–397
source code, 16
creating
in Macintosh, 404
in Windows, 400–401
defined, 473
South region, 317–319
specifying files in final project, 365–368, 366
SpringLayout layout manager, 325
square brackets ([]) for arrays, 102
squares, 280
stack traces
checked exceptions with, 216–217
defined, 473
runtime exceptions with, 206–208
startsWith method, 233, 385
statements
declarations, 27
in for loops, 91
static classes, 473
static data, 128–130
static methods, 126–127, 130–132
static modifier, 60
Step Lightspeed option, 10
STORE opcode, 7
storeCubes method, 207–208
storeOneCube method, 207–208
String class, 188
API pages for, 226
for command-line arguments, 235–236, 235
working with, 229–234, 231–232, 234
string concatenation, 233, 237–238
defined, 473
lab for, 238–239, 238–239
StringLab animated illustration, 231–232, 231–232
styles of fonts, 284–285
SUB opcode, 7
subclasses
defined, 473
inheritance by, 140–142
protected access with, 177
Submarine class, 149–150, 149
subpackages, 165
substring method, 233, 382, 385
subtraction
basic operator for, 37
decrement operator for, 45–46
subtractive primary colors, 273, 473
sums, 37
super keyword, 151–152
supercategories, 142
superclasses, 140–142
defined, 473
inheritance from, 142–145, 144–145
Swing toolkit
for GUI, 271
for layout managers, 325
switch statements, 77–79
break statements in, 79–81
default statements in, 79–80
System class, 241–243
System.exit call, 333, 343
|