Index_C


C

callers for methods, 60, 471

calling methods, 60, 66–67

Canvas class, 377

CardLayout manager, 325

carets (^)

for bitwise operator, 40–41

for boolean operator, 46–48

in compound assignment, 51

Cartesian coordinates, 277, 278

case statements, 79

catch blocks

defined, 469

execution in, 202–203

with instanceof, 212–216, 216

multiple, 210–212

safety net, 213

catching exceptions, 202–203

CboxAndChoice class, 352–353

CboxInnaFrame class, 296

Center region, 317–319, 319

CenteredOval class, 282, 283

chaining

defined, 469

input, 259, 259

output, 256, 257

chains of constructions

defined, 469

in inheritance, 149–152, 149

char data type

with result types, 52–53, 53

for text, 25

wrapper class for, 240

character code for files, 263

characters, 25

charAt method, 233

charIndexToX method, 383, 386

Chart class, 182–185, 183

checkboxes

events from, 351–353, 351

in flow layout managers, 316

working with, 296–300, 296–298, 300

CheckboxGroup class, 299

checked exceptions, 205

with stack traces, 216–217

throwing, 217–220

working with, 208–209

CheckedCbox class, 297

Choice class, 302

choices

events from, 351–353, 353

working with, 301–304, 301–302, 304

ChooseFontByRadios class, 301

circles, 280

clamp method, 75

class definitions, 35, 120

class files

compiler output, 19, 29

defined, 469

class keyword, 119

class loaders

defined, 469

functions of, 132–133, 170

.class suffix, 19, 29

classes, 119–120, 119

abstract, 182–185, 183

core. See core classes and packages

in packages, 165

classname-dot-staticVariableName syntax, 130

classpath elements, 168–170, 469

CLASSPATH environment variable

for executables

in Macintosh, 402–403

in Windows, 396, 398–399

for packages, 169

-classpath option in javac, 169

close method, 251, 258

closing streams, 251

colons (:)

in classpath elements, 169

for labels, 96

in ternary operator, 77

color

in final project, 368–376, 369, 372, 378–389, 379

for frames, 271, 275–276

for painting, 273–276, 275–276

Color class, 183, 237–238, 274

Color Lab program, 275–276, 275–276

ColorChoice class, 374–375

ColorChoiceTest class, 374–375

ColorTest class, 372–374

columns in text areas, 310

command-line arguments, 235–236, 235

comments

defined, 469

in Frame Lab, 287

painting, 383–384

types of, 36

comparison operators, 50–51

compatibility, backward, 228

compiled languages, 16–17

vs. assembly, 17–18, 18

defined, 469

compiler

downloading, 396

for packages, 166–167, 168, 169

references with, 155

compiling, 206

components, 102, 292, 292

buttons, 293–295, 293, 295

checkboxes

events from, 351–353, 351

in flow layout managers, 316

working with, 296–300, 296–298, 300

choices

events from, 351–353, 353

working with, 301–304, 301–302, 304

defined, 469

events for. See events

exercise questions for, 327–328

exercise solutions for, 448–454

labels, 304–305, 305

layout managers. See layout managers

menus, 305–309, 307–308

scrollbars, 312–313, 313

text areas, 310–312, 311–312

text fields, 309–310, 310

compound assignments, 51

computePixel method, 90

concat method, 233

concatenation of strings, 233, 237–239, 238–239

ConcatLab animated illustration, 238–239, 238–239

conditionals, 74

defined, 469

exercise questions for, 98–99

exercise solutions for, 416–420

in for loops, 87, 87

if statements, 74–76

switch statement, 77–81

ternary operator, 76–77

ConnectException class, 210–211, 213–215, 219

constants

benefits of, 181–182

in interfaces, 193–194

construction

chains of, 149–152, 149

defined, 469

with new, 111

ConstructorLab animated illustration, 150–152

constructors, 146–147

in API pages, 227, 227

default, 148–149

defined, 469

overloading, 147–148

Container class, 313

containers, 469

contexts, graphics, 277

continue statement

labeled, 94–97

purpose of, 89–90

coordinates, 277, 278

core classes and packages, 205, 222–223

API pages for, 222–228, 224–227

exercise questions for, 244–246

exercise solutions for, 440–442

java.lang, 228

java.lang.Integer, 240–241

java.lang.Math, 243–244

java.lang.Object, 236–239, 238–239

java.lang.String, 229–236, 231–232, 234–235

java.lang.System, 241–243

cos method, 243

-cp option in javac, 169

CreateArrayLab animated illusion, 111–113, 113

.cshrc file for paths, 402

curly brackets ({})

for arrays, 105

for constructors, 146

for definitions, 35

for do-while loops, 86

in for loops, 91

for if statements, 74

for interfaces, 188

for method declarations, 59

for scope, 68

for while loops, 82

cycloids, 91–92, 91




Ground-Up Java
Ground-Up Java
ISBN: 0782141900
EAN: 2147483647
Year: 2005
Pages: 157
Authors: Philip Heller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net