|
-d option in package, 166–167
data and data types, 16, 19
boolean, 25
characters, 25
in declarations, 27
declaring and assigning, 26–28
exercise questions for, 30–31
exercise solutions for, 407–409
floating-point, 24–25
integer, 21–24, 22–23
in interfaces, 192–194
for objects, 120–122, 121–122
summary, 26
Data Chain Lab animated illustration, 261, 262
data hiding
defined, 469
in object-oriented programming, 172–173
DataInputStream class, 256, 259
DataLab animated illustration, 122, 122
DataOutputStream class, 256–257
debug code, 469
declarations, 16, 26–28
for arrays, 102
defined, 469
in interfaces, 188–189
for methods, 59
decrement operator, 45–46
default access
defined, 469
purpose of, 174–176
default code, 81
default constructors
defined, 469
purpose of, 148–149
default statements, 79–80
definitions, class, 35, 120
deprecated methods
compatibility of, 228
defined, 469
destination directories
defined, 469
for packages, 167
Developer Tools package, 402
Developer Tools Update, 401–402
dialog boxes
class for, 365–366, 366
defined, 469
differences, 37
digital circuits, 2
vs. analog, 3
defined, 469
digital computers, 2
vs. analog, 3
defined, 470
Dimension class, 282
dimensions for arrays, 106–108, 106, 108–109
directories, 165
for installation files, 397, 403
for packages, 166–167, 166
for programs, 398
disabling components, 349
DisablingNim class, 349–351
disks, 248–249. See also files
display method, 183–185
division
operator for, 37
truncation with, 40
do-while loops, 85–86
docs directory, 224
Dog class, 120
double data type
defined, 470
range of, 24–25
with result types, 52–53, 53
wrapper class for, 240
double-quotes (“) for literal strings, 30, 229
downloading and installing Java
in Macintosh, 401–404
overview, 396
in Windows, 396–401, 397
drawing, 277, 278. See also painting
circles, 280
filling in, 281–282, 281, 283
frames, 287–289, 287–289
lines, 278, 279
ovals, 280–281, 280–281
rectangles, 279, 279
squares, 280
text, 283–286, 284–286
drawLine method, 278
drawOval method, 280–281
drawRect method, 279–280
drawString method, 283–285
dump method, 129
dumpSalary method, 146
|