insect, 235
Abstract data type (ADT), 157
Abstract windowing toolkit (AWT), 405, 729
applet frame class, 450
button control, 459
checkbox class, 466
choice class, 480
components, 406
container class, 449
events, 406
frame class, 450
list class, 473
panel class, 450
scrollbar class, 483
window class, 450
window hierarchy, 449
ActionEvent class, 407
Actionlistener interface, 414
AdjustmentEvent class, 408
Adjustmentlistener interface, 414
ALGOL, 2
Anonymouse inner class, 441–444
Append method, 279
API, 44
programming, 782
Applet class
audioclip interface, 380
graphics class, 383
hierarchy of, 362
methods, 363
vs. application programs, 361–362
Applet tag and applet parameters, 368–369
Appletcontext interface, 377–378
appletviewer applet1.java
, 365
Arguments to methods, 203
Arithmetic operators, 50
ArithmeticException, 293
Armstrong number, 95
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 XOR (^), 63
Boolean class, 635
Borderlayout, regions, 520
instruction, 790
Bytecode array, values, 43
Byte stream, 351
I/O classes, 351
Call stack, 284
Capacity, 542
method, 278
CardLayouts, 524
Cartesian coordinates, 394
Chained assignment, 59
Character stream I/O classes, 346
CharArrayReader class
, 347
CharAt method
, 267
Collection class, 538
Classes and objects
passing and returning, 167–171
private data assessment, 164–167
static member functions, 178
class.class_name
, 157
Collection interface, 535
hierarchy, 534
iterating elements, 545
listIterator interface
, 545
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
disadvantage, 111
Control flow statements, 77
Constructors, 181
Coordinate system in Java, 364
CPU cycles, 405
Data members, 158
DataInputStream class, 31
Dictionary class, 573
Domain Name Service (DNS), 641
built-in, 729
Data types
default values, 159
Decision-making statements, 77
Decision structure, 1
implementation, 2
Default constructor, 183
Decrement (++) operator, 59–61
Delegation event model, 405–406
delete method
, 278
deleteCharAt method
, 278
diagrammatical implementation, 269
constants, 749
Drawing lines and rectangles, 383–384
Drawing ovals and circles, 384–385
Drawstring method, 399
Dynamic method dispatch, 219–221
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
checked vs. unchecked, 287–288
defined, 284
exception handler, 285
hierarchy, 287
mechanism, 286
runtime, 287
Explicit type conversion, 70–71
Expressions, types, 50
Fibonacci series, 144
FileFilter interface
, 344
FileInputStream class methods
, 355
FileOutputStream class methods
, 355
FileReader class, 347
FileWriter class
, 347
Float and double class, 627–631
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
examples, 98
Frame design, 41
Garbage collected heap, 37, 792
Garbage collection, 201
getBytes method, 271
implementation, 270
getClass method
, 616
Getcodebase() methods, 375–376
Getdocumentbase(), 375
getName method
, 616
getParameter method
, 371
GridLayout laysout, 522
Handling internet addresses, 642
Handling keyboard events, 424–428
Handling mouse events, 417
HashMap, 555
constructor, 557
HashTable class, 573
Hello World' program, 685
Hierarchical inheritance, 209–210
Historical collection, 566
HSB color system, 386
if-dependent statements
, 79
if-else statement
, 78
if_icmpge instruction
, 804
if statement
, 77
iinc instruction
, 805
Illegal AccessException, 297–298
Iload instruction, 803
ImageConsumer interface
, 723
consuming, 723
Imageicon class
, 730
Imageobserver interface
, 705
ImgeProducer interfaces
, 723
InetAddress class
, 642
Inheritance
derived class, 207
hierarchical inheritance, 209–210
hybrid, 210
implementation, 207
multiple, 209
single level, 208
workflow, 6
Inner classes in event handling, 439–441
Inner classes in methods and scopes, 436–438
InputEvent class, 410
Insert method
, 279
IOException
, 297
Interface definition language (IDL), 816
Interfaces
implementation, 253
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
benefits, 10
character set, 12
data type, 16
declaration. 116
function with parameters, 146–149
output screen, 19
recursion, 149
Java animation API, 815
Java API framework, 783
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
Javac, 45
Java collaboration API, 815
Java commerce API, 816
Java development kit (JDK), 19–20, 45
Java enterprise API, 815
Java 1.1 event model, 406
class, 406
Java 1.0 inheritance event model, 405
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 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, 687–688
limitations, 688
Java.net package, 642
Java program on notepad, 22
Java remote method invocation (RMI), 695–696
Java security API, 814
Java server APIs, 186
Java speech, 815
Java stack frame, 790
Java standard extension API, 783, 813–814
Java telephony API, 815 Java tokens, 12
identifier, 13
Java virtual machine (JVM), 9, 35, 37, 44, 783–785, 790, 792
fundamental pieces, 784
implementation, 36
location, 35
set of register, 790
JDK's appletviewer, 366
Jtoolbar instance, 762
Just-in-time compiler, 789
KeyListener interface, 415
Labelled break, 111
Layout and layout manager, 518
Left shift operator (<<), 64–65
length() method, 267
LIFO stack, 42
Linkedlist class, 542
Linking process
dynamic binding, 219.
static binding, 219
Listeners interfaces, 414
List implementations, 539
Local applets, 361
Logical Not (!), 58
Logical operator, 56
Logical OR, 57
lookupswitch instruction, 809–810
Loop/iteration structure, 1
implementation, 2
Magenta, 520
MalformedURLException, 682
Maps, 554
classes, 557
Map.Entry Interface, 556
Map interface, 554
methods, 555
Matrix multiplication, procedure for, 132
Membership operator, 158
MemoryImageSource, 724
object, 722
Menu and menubars
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
mouseclicked method
, 419
MouseListener interface
, 415–416
MouseMotionListener interface
, 416
mouseReleased
, 422
Multithreading, 309
MyMouseAdapter, 429
Nested and inner classes, 431–432
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
data hiding, 5
dynamic binding, 6
encapsulation, 5
polymorphism, 5
ObjectOutput interface, 689–690
Object slicing process, 229–231
Observable class, 601
Observer interface, 601
overriding imageUpdate, 706
Operating system (OS), 783
OutputStream classes, hierarchy, 352
Packages, 44
Packages and interfaces
access protection table, 252
Palindrome, 94
PASCAL, 1
PixData, 724
Polygon, defined, 385
POW, 96
PrintStream, 80
Procedural programming language, 2
Procedure-oriented programming characteristics, 2
Program counter, 37
Programming methodology
Polymorphism, bifurcation, 5
public final String getName()
, 313
public static Thread currentThread()
, 313
Public void paint, 790
Quadratic equation, 85
Reader class, 346
Recursion programming, 149–151
Relation and ternary operator, 53–56
Remainder operator, 50
Replace method, 269
Reverse method, 278
RGB color system, 386
Right shift operator (>>), 65–66
Right Shift with Zero Fill (>>>), 66–67
RMI service, 696
RTF, 729
Running applet for applet1.java, 364
Runtime memory area, 792
Scanner class, methods, 32
Scrollbar class, 483
parts, 483
properties, 484
Sequence structure, implementation, 1
Serializable interface, 689
Serialization, 689
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
StackOverflowError, 791
Static binding, 219
Static member functions, 178
Static variables, 177
Stream, 336
byte, 351
reading and writing files, 353–354
writing to console, 353
String
constructors for string class, 266–267
methods of string class, 267–271
constructor of, 277
StringBuffer(int capacity), 277
StringBuffer(String str), 277
Stringtokenizer class, 590–592
Structured programming, 1
Swing, components, 729
System properties, 609
System.out.println, 80
System-dependent fonts, 397
tableswitch instruction, 807–808
TextEvent class, 413
TextListener interface, 416
Thread chat server and client, 672–675
implementing thread using runnable, 318–319
suspended and resuming threads, 327–328
synchronized statement, 324
Three-dimensional (3-D) array, 134–137
Three-line coding, 30
Throw keyword, 294
toUpperCase method, 271
Transpose matrix, 129
TreeMap Class, 559
trim method, 271
try block, 286
try-catch block
Two-dimensional (2-D) array, 125–126
column-major implementation, 126
row-major implementation, 126
Update method, 373
URL, 680
constructors, 682
User-defined packages, 241–246
ValueOf method, 271
Variable, 15
constructors, 567
methods, 568
Virtual machine
instruction set, 793
throwing and handling exceptions, 810–813
VirtualMachineError, 792
Virtual parts, 36
while statement, 89
windowClosing method
, 453
WindowEvent class, 413
WindowListener interface, 416–417
Wrapper class, 624
Writer class, 347
XOR color
18.218.187.108