Index

Abstract class, 231233

insect, 235

Abstract data type (ADT), 157

Abstract windowing toolkit (AWT), 405, 729

applet frame class, 450

button control, 459

checkbox class, 466

checkboxgroup class, 470473

choice class, 480

component class, 372, 449

components, 406

container class, 449

controls, 458459

events, 406

frame class, 450

label class, 464466

list class, 473

panel class, 450

scrollbar class, 483

structure, 446447

textfield class, 488492

window class, 450

window hierarchy, 449

ActionEvent class, 407

Actionlistener interface, 414

Adapter classes, 428429

AdjustmentEvent class, 408

Adjustmentlistener interface, 414

ALGOL, 2

Algorithm support, 581586

Anonymouse inner class, 441444

Append method, 279

API, 44

programming, 782

Applet class

audio, 378380

audioclip interface, 380

graphics class, 383

hierarchy of, 362

life cycle, 366367

methods, 363

vs. application programs, 361362

Applet tag and applet parameters, 368369

Appletcontext interface, 377378

appletviewer applet1.java, 365

Arguments to methods, 203

Arithmetic operators, 50

ArithmeticException, 293

Armstrong number, 95

Arraylist, 538539

class, 539

ASCII/unicode values, 86

Automatic memory management, 201

Backslash character constant, 14

Base class, 207

Binary operators, 49

Binding process

dynamic binding, 219

static binding, 219

Bipush statement, 796

Bitwise AND (&), 61

Bitwise operators, 61

Bitwise OR (|), 6263

Bitwise XOR (^), 63

Boolean class, 635

Boolean variable, 56, 78, 389

Borderlayout, regions, 520

Break statement, 108109

Built-in packages, 240241

Bytecode, 35, 38

implementation, 4041

instruction, 790

Bytecode array, values, 43

Byte stream, 351

I/O classes, 351

Calendar class, 595598

Call stack, 284

Capacity, 542

method, 278

CardLayouts, 524

Cartesian coordinates, 394

Chained assignment, 59

Character class, 631632

Character stream I/O classes, 346

CharArrayReader class, 347

CharAt method, 267

Client, 647648

Clone method, 610611

Collection class, 538

Comparator interface, 563566

Classes and objects

array, 174177

constructors, 181182

copying, 171172

passing and returning, 167171

private data assessment, 164167

programming examples, 160164

static class members, 177178

static member functions, 178

class.class_name, 157

Collection interface, 535

hierarchy, 534

iterating elements, 545

listIterator interface, 545

Command line arguments, 3334

command1.java, 34

compareTo method, 267

compareToIgnoreCase method, 268

Compilation process, 39

ComponentEvent class, 409

ComponentListener interface, 414

Compound operator, 58

Concat method, 268

Container, 409

ContainerAdapter class, 414

ContainerListener Interface, 414

Continue statement, 110111

disadvantage, 111

Control flow statements, 77

Constructors, 181

inheritance, 224229

with parameters, 182183

Coordinate system in Java, 364

Copy constructor, 195196

CPU cycles, 405

Daemon threads, 331332

Datagram, 675680

Data members, 158

DataInputStream class, 31

Date class, 592595

Dialogs box, 506510

Dictionary class, 573

Domain Name Service (DNS), 641

Double buffering, 709712

built-in, 729

Data types

default values, 159

range, 1617

Decision-making statements, 77

Decision structure, 1

implementation, 2

Default constructor, 183

Decrement (++) operator, 5961

Delegation event model, 405406

delete method, 278

deleteCharAt method, 278

diagrammatical implementation, 269

Dialogs, 746753

constants, 749

file selection, 754758

do-while statement, 105106

Drawing lines and rectangles, 383384

Drawing ovals and circles, 384385

Drawstring method, 399

Dynamic method dispatch, 219221

else-if ladder, 8384

employeeName method, 42

EmptyStackException, 294

endsWith method, 268

ensureCapacity method, 278

Enumeration interface, 566

Environment variables, 20

property, 608

Equals method, 268

EqualsIgnoreCase method, 268

Event listeners, 407

Event sources, 407

Exception-generated block, 286

Exception handling

basis, 285286

checked vs. unchecked, 287288

classes, 286287

defined, 284

exception handler, 285

hierarchy, 287

mechanism, 286

runtime, 287

Explicit type conversion, 7071

Expressions, types, 50

Fibonacci series, 144

File class method, 337341

Filedialog class, 511515

FileFilter interface, 344

FileInputStream class methods, 355

FileOutputStream class methods, 355

FileReader class, 347

FileWriter class, 347

Float and double class, 627631

Flowlayout, 518519

FocusAdaptor object, 409

FocusEvent class, 409

FocusListener interface, 415

Font class methods, 398

Font class properties, 398

Fontmetrics class, 400

Fontmetrics object, 400

Fonts

dialog, 397

dialoginput, 397

monospaced, 397

sansserif", 397

serif", 397

For loop, 9697

different syntaxes, 9798

examples, 98

nesting, 100101

Frame design, 41

Garbage collected heap, 37, 792

Garbage collection, 201

getBytes method, 271

getChars method, 268269

implementation, 270

getClass method, 616

Getcodebase() methods, 375376

Getdocumentbase(), 375

getName method, 616

getParameter method, 371

Getstatic, 791, 804

GridBagLayout, 518, 524

GridLayout laysout, 522

Handling internet addresses, 642

Handling keyboard events, 424428

Handling mouse events, 417

HashMap, 555

Hashset classes, 550551

constructor, 557

HashTable class, 573

Hello World' program, 685

Hierarchical inheritance, 209210

revisited, 221223

Historical collection, 566

HSB color system, 386

HTML, 361, 729

if-dependent statements, 79

if-else statement, 78

nesting, 8183

if_icmpge instruction, 804

if statement, 77

iinc instruction, 805

Illegal AccessException, 297298

Iload instruction, 803

Image, 702704

ImageConsumer interface, 723

Image data, 716722

consuming, 723

Imageicon class, 730

Imageobserver interface, 705

ImgeProducer interfaces, 723

Increment (++), 5961

InetAddress class, 642

Inheritance

derived class, 207

hierarchical inheritance, 209210

hybrid, 210

implementation, 207

multilevel, 208209

multiple, 209

programming examples, 211218

single level, 208

types, 207208

workflow, 6

Inner classes in event handling, 439441

Inner classes in methods and scopes, 436438

InputEvent class, 410

Insert method, 279

Insets, 531532

Instance of operator, 6768

IOException, 297

Interface definition language (IDL), 816

Interfaces

declaration, 252253

extending classes, 260262

implementation, 253

programming examples, 254260

Internet Domain sockets, 645

ItemEvent class, 410

ItemListener interface, 415

Iterator interface, methods, 545

J2SE development kit, 20

Japplet class, 730

Java 3D API, 815

Java

array, 116118

benefits, 10

character set, 12

comments, 1516

data type, 16

declaration. 116

defined, 9, 140142

evolution, 910

features, 1012

first program, 1819

function declaration, 140142

function with parameters, 146149

output screen, 19

overloading, 151154

platform, 4445

programming examples, 2324

recursion, 149

setting-up java, 1920

sockets, 645646

structure, 1718

syntax, 142145

Java animation API, 815

Java API framework, 783

Java API package, 816818

Java applet API, 813

Java application program, runtime memory area, 792

Java base API, 813

java.applet.Applet, 361

java.awt.FontMetrics, 400

Java base platform

java API, 782

java virtual machine, 782

Java bytescodes, 35, 785

Javac, 45

Java collaboration API, 815

Java commerce API, 816

Java compiler, 36, 45

Java development kit (JDK), 1920, 45

Java enterprise API, 815

Java 1.1 event model, 406

class, 406

Java interpreter, 19, 22, 791

Java 1.0 inheritance event model, 405

Java, internet and www, 4445

java.io package, 336

Java's checked exceptions, 289

javac applet1.java, 363

Java's GUI components, 383

java.lang, 231

Java management API, 816

components, 816

Java media API, 814815

java 2D API, 815

java media framework (JMF) API, 815

Java media capture, 815

Java media conference, 815

Java media player, 815

Java native interface (JNI)

example, 685

JNI-style header file, 687688

limitations, 688

role, 684685

Java.net package, 642

Java program on notepad, 22

Java remote method invocation (RMI), 695696

Java security API, 814

Java server APIs, 186

Java speech, 815

Java stack frame, 790

Java standard extension API, 783, 813814

Java telephony API, 815 Java tokens, 12

constants/literal, 1314

identifier, 13

keywords, 1213

Java virtual machine (JVM), 9, 35, 37, 44, 783785, 790, 792

fundamental pieces, 784

implementation, 36

location, 35

set of register, 790

stack, 37, 41

Jbutton class, 731733

Jcheckbox class, 734736

Jcombobox class, 738741

JDK's appletviewer, 366

Jlabel class, 730731

Jprogressbar class, 763767

JPS2.BC, 8589

JPS3.BC, 794795

JPS8.java, 39, 45

Jradiobutton class, 736738

Jscrollpane class, 743745

Jslider class, 767771

Jsplitpane class, 745746

Jtabbedpane class, 741743

Jtable class, 759760

Jtextfield class, 733734

Jtoolbar class, 759760

Jtoolbar instance, 762

Jtree class, 771774

Just-in-time compiler, 789

KeyEvent class, 410411

KeyListener interface, 415

Labelled break, 111

Layout and layout manager, 518

Left shift operator (<<), 6465

length() method, 267

LIFO stack, 42

Linkedlist class, 542

Linking process

dynamic binding, 219.

static binding, 219

Listeners interfaces, 414

List implementations, 539

List interface, 536537

Local applets, 361

Logical AND, 5657

Logical Not (!), 58

Logical operator, 56

Logical OR, 57

lookupswitch instruction, 809810

Loop/iteration structure, 1

implementation, 2

Magenta, 520

MalformedURLException, 682

Maps, 554

classes, 557

Map.Entry Interface, 556

Map interface, 554

methods, 555

Mathematical functions, 7172

Matrix multiplication, procedure for, 132

Mediatracker class, 713714

Membership operator, 158

MemoryImageSource, 724

object, 722

Menu and menubars

examples, 774779

popup, 503506

shortcut key, 501

Method area, 37

Method overriding, 218

mkdir method, 341

Mnemonic instructions representation, 36

Modular programming, 1

Modifier

private, public, 249

protected, 249

mousePressed method, 391, 422

mouseclicked method, 419

MouseEvent Class, 411412

MouseListener interface, 415416

MouseMotionListener interface, 416

mouseReleased, 422

Multithreading, 309

MyMouseAdapter, 429

Nested and inner classes, 431432

Newarray instruction, 800, 802

NullPointerException, 791, 802

Number class, 625

Object-based languages, 7

Object class, 610

ObjectInputStream class, 692

Object-oriented programming (OOP), 4, 9

advantages, 6

chracteristics, 6

class and object, 45

data hiding, 5

dynamic binding, 6

encapsulation, 5

inheritance, 56

polymorphism, 5

ObjectOutput interface, 689690

Object slicing process, 229231

Observable class, 601

Observer interface, 601

overriding imageUpdate, 706

1-D array, 118125

examples, 119122

Operating system (OS), 783

OutputStream classes, hierarchy, 352

Overloading function, 151154

Packages, 44

Packages and interfaces

access protection table, 252

types, 240246

Paint method, 372, 396

Palindrome, 94

PASCAL, 1

Passing parameter, 369370

PixData, 724

Polygon, defined, 385

Popup menus, 503506

POW, 96

Precedence of operator, 6970

PrintStream, 80

Procedural programming language, 2

Procedure-oriented programming characteristics, 2

Process class, 621624

Program counter, 37

Properties class, 576577

Programming methodology

bottom-up, 23

top-down approaches, 24

Polymorphism, bifurcation, 5

public final String getName(), 313

public static Thread currentThread(), 313

Public void paint, 790

Quadratic equation, 85

Random class, 599601

Reader class, 346

Recursion programming, 149151

Relation and ternary operator, 5356

Remainder operator, 50

Repaint method, 373375

Replace method, 269

Return statement, 145146

Reverse method, 278

RGB color system, 386

Right shift operator (>>), 6566

Right Shift with Zero Fill (>>>), 6667

RMI service, 696

RTF, 729

Running applet for applet1.java, 364

Runtime class, 619720

Runtime memory area, 792

Scanner class, methods, 32

Scope and lifetime, 7374

Scrollbar class, 483

parts, 483

properties, 484

Sequence structure, implementation, 1

Serializable interface, 689

Serialization, 689

Server, 646647

Set interface, 537

SetLength method, 279

setXORMode, 388

Shorthand assignment operator, 58

ShowStatus method, 367

Sipush statement, 796

Sizeof () operator, 69

Sleep method, 316

Socket fundamentals, 645

Sortedset interface, 538

SortedMap interface, 556

methods, 556

Stack, 790

after pop operation, 191

after push operation, 190

class, 571572

StackOverflowError, 791

Static binding, 219

Static class members, 177178

Static data members, 179181

Static member functions, 178

Static nested class, 438439

Static variables, 177

Stream, 336

byte, 351

character, 345346

programming Examples, 348351

reading and writing files, 353354

reading from console, 352353

types, 344345

writing to console, 353

String

constructors for string class, 266267

methods of string class, 267271

programming examples, 272276

string class, 265266

String buffer class, 276277

constructor of, 277

methods, 277280

programming examples, 280281

StringBuffer(int capacity), 277

StringBuffer(String str), 277

Stringtokenizer class, 590592

Structured programming, 1

Super keyword, 223224

Swing, components, 729

Switch-case statement, 8689

System class, 606607

System properties, 609

System.out.println, 80

System-dependent fonts, 397

tableswitch instruction, 807808

Textarea class, 492494

TextEvent class, 413

TextListener interface, 416

this reference, 196201

Thread chat server and client, 672675

Threads, 309310

communication, 324325

implementing thread using runnable, 318319

methods, 313314

priority, 320321

suspended and resuming threads, 327328

synchronization, 322323

synchronized statement, 324

Three-dimensional (3-D) array, 134137

Three-line coding, 30

Throw keyword, 294

toString method, 271, 549

toUpperCase method, 271

Transpose matrix, 129

TreeMap Class, 559

Treeset classes, 551554

trim method, 271

try and catch, 290291

try block, 286

try-catch block

nesting, 300301

Two-dimensional (2-D) array, 125126

column-major implementation, 126

diagonal element, 130132

row-major implementation, 126

Update method, 373

URL, 680

constructors, 682

User-defined packages, 241246

Unary operators, 4950

ValueOf method, 271

Variable, 15

length arrays, 1 34

Vector class, 566567

constructors, 567

methods, 568

Virtual machine

array, 800801

class instance, 796798

instruction set, 793

invoking methods, 793794

switch statements, 805806

throwing and handling exceptions, 810813

VirtualMachineError, 792

Virtual parts, 36

while loop, 8993

while statement, 89

windowClosing method, 453

WindowEvent class, 413

WindowListener interface, 416417

without try-catch, 289290

Wrapper class, 624

Writer class, 347

XOR color

XOR mode, 387, 391

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.187.108