Skip to content

Java(tm)2: a Beginner's Guide

Best in textbook rentals since 2012!

ISBN-10: 0072225882

ISBN-13: 9780072225884

Edition: 2nd 2003

Authors: Herbert Schildt

List price: $29.99
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Java works in almost every situation, from small hand-held devices right up to supercomputers. This text has been tailored to meet the needs of the beginning Java programmer, with hands-on coverage, step-by-step instructions and tutorials.
Customers also bought

Book details

List price: $29.99
Edition: 2nd
Copyright year: 2003
Publisher: McGraw-Hill Osborne
Publication date: 11/25/2002
Binding: Paperback
Pages: 544
Size: 7.50" wide x 9.25" long x 1.00" tall
Weight: 1.892
Language: English

Herbert Schildt is a world leading programming author. He is an authority on the C, C++, Java, and C# programming languages, and a master Windows programmer. His programming books have sold more than three million copies worldwide and have been translated into all major foreign languages. He is the author of numerous best sellers including C: The Complete Reference, Java 2: The Complete Reference, Java 2: A Beginner's Guide, C#: A Beginner's Guide, and many more. Schildt holds a master's degree in computer science from the University of Illinois.

Prefacep. xix
Java Fundamentalsp. 1
The Origins of Javap. 2
How Java Relates to C and C++p. 3
How Java Relates to C#p. 4
Java's Contribution to the Internetp. 5
Java Applets and Applicationsp. 5
Securityp. 5
Portabilityp. 6
Java's Magic: The Bytecodep. 6
The Java Buzzwordsp. 7
Object-Oriented Programmingp. 8
Encapsulationp. 9
Polymorphismp. 10
Inheritancep. 10
Obtaining the Java Software Developer's Kitp. 12
A First Simple Programp. 12
Entering the Programp. 13
Compiling the Programp. 13
The First Sample Program Line by Linep. 14
Handling Syntax Errorsp. 17
A Second Simple Programp. 17
Another Data Typep. 20
Converting Gallons to Litersp. 22
Two Control Statementsp. 23
The if Statementp. 23
The for Loopp. 25
Create Blocks of Codep. 27
Semicolons and Positioningp. 29
Indentation Practicesp. 29
Improving the Gallons-to-Liters Converterp. 30
The Java Keywordsp. 32
Identifiers in Javap. 32
The Java Class Librariesp. 33
Module 1 Mastery Checkp. 34
Introducing Data Types and Operatorsp. 35
Why Data Types Are Importantp. 36
Java's Simple Typesp. 36
Integersp. 37
Floating-Point Typesp. 38
Charactersp. 40
The Boolean Typep. 41
How Far Away Is the Lightning?p. 43
Literalsp. 44
Hexadecimal and Octal Constantsp. 44
Character Escape Sequencesp. 45
String Literalsp. 45
A Closer Look at Variablesp. 47
Initializing a Variablep. 47
Dynamic Initializationp. 48
The Scope and Lifetime of Variablesp. 49
Operatorsp. 52
Arithmetic Operatorsp. 52
Increment and Decrementp. 54
Relational and Logical Operatorsp. 55
Short-Circuit Logical Operatorsp. 57
The Assignment Operatorp. 58
Shorthand Assignmentsp. 60
Type Conversion in Assignmentsp. 61
Casting Incompatible Typesp. 62
Operator Precedencep. 64
Display a Truth Table for the Logical Operatorsp. 65
Expressionsp. 66
Type Conversion in Expressionsp. 66
Spacing and Parenthesesp. 68
Module 2 Mastery Checkp. 69
Program Control Statementsp. 71
Input Characters from the Keyboardp. 72
The if Statementp. 74
Nested ifsp. 75
The if-else-if Ladderp. 76
The switch Statementp. 78
Nested switch Statementsp. 82
Start Building a Java Help Systemp. 83
The for Loopp. 86
Some Variations on the for Loopp. 87
Missing Piecesp. 88
Loops with No Bodyp. 90
Declaring Loop Control Variables Inside the for Loopp. 91
The while Loopp. 92
The do-while Loopp. 94
Improve the Java Help Systemp. 97
Use break to Exit a Loopp. 100
Use break as a Form of gotop. 102
Use continuep. 106
Finish the Java Help Systemp. 109
Nested Loopsp. 112
Module 3 Mastery Checkp. 113
Introducing Classes, Objects, and Methodsp. 115
Class Fundamentalsp. 116
The General Form of a Classp. 116
Defining a Classp. 117
How Objects Are Createdp. 121
Reference Variables and Assignmentp. 121
Methodsp. 122
Adding a Method to the Vehicle Classp. 123
Returning from a Methodp. 125
Returning a Valuep. 126
Using Parametersp. 129
Adding a Parameterized Method to Vehiclep. 130
Creating a Help Classp. 133
Constructorsp. 139
Parameterized Constructorsp. 140
Adding a Constructor to the Vehicle Classp. 141
The new Operator Revisitedp. 142
Garbage Collection and Finalizersp. 143
The finalize() Methodp. 144
Demonstrate Finalizationp. 145
The this Keywordp. 147
Module 4 Mastery Checkp. 149
More Data Types and Operatorsp. 151
Arraysp. 152
One-Dimensional Arraysp. 152
Sorting an Arrayp. 156
Multidimensional Arraysp. 158
Two-Dimensional Arraysp. 158
Irregular Arraysp. 160
Arrays of Three or More Dimensionsp. 161
Initializing Multidimensional Arraysp. 161
Alternative Array Declaration Syntaxp. 163
Assigning Array Referencesp. 164
Using the length Memberp. 165
A Queue Classp. 168
Stringsp. 172
Constructing Stringsp. 172
Operating on Stringsp. 173
Arrays of Stringsp. 176
Strings Are Immutablep. 176
Using Command-Line Argumentsp. 178
The Bitwise Operatorsp. 180
The Bitwise AND, OR, XOR, and NOT Operatorsp. 180
The Shift Operatorsp. 185
Bitwise Shorthand Assignmentsp. 187
A ShowBits Classp. 188
The ? Operatorp. 191
Module 5 Mastery Checkp. 193
A Closer Look at Methods and Classesp. 195
Controlling Access to Class Membersp. 196
Java's Access Specifiersp. 196
Improving the Queue Classp. 202
Pass Objects to Methodsp. 203
How Arguments Are Passedp. 205
Returning Objectsp. 208
Method Overloadingp. 210
Overloading Constructorsp. 216
Overloading the Queue Constructorp. 219
Recursionp. 222
Understanding staticp. 224
Static Blocksp. 227
The Quicksortp. 229
Introducing Nested and Inner Classesp. 232
Module 6 Mastery Checkp. 236
Inheritancep. 239
Inheritance Basicsp. 240
Member Access and Inheritancep. 243
Constructors and Inheritancep. 246
Using super to Call Superclass Constructorsp. 248
Using super to Access Superclass Membersp. 254
Extending the Vehicle Classp. 255
Creating a Multilevel Hierarchyp. 258
When Are Constructors Called?p. 261
Superclass References and Subclass Objectsp. 262
Method Overridingp. 268
Overridden Methods Support Polymorphismp. 271
Why Overriden Methods?p. 273
Applying Method Overriding to TwoDShapep. 273
Using Abstract Classesp. 278
Using finalp. 283
final Prevents Overridingp. 283
final Prevents Inheritancep. 283
Using final with Data Membersp. 284
The Object Classp. 286
Module 7 Mastery Checkp. 287
Packages and Interfacesp. 289
Packagesp. 290
Defining a Packagep. 290
Finding Packages and CLASSPATHp. 292
A Short Package Examplep. 292
Packages and Member Accessp. 294
A Package Access Examplep. 295
Understanding Protected Membersp. 297
Importing Packagesp. 299
Java's Class Library Is Contained in Packagesp. 302
Interfacesp. 303
Implementing Interfacesp. 304
Using Interface Referencesp. 308
Creating a Queue Interfacep. 310
Variables in Interfacesp. 316
Interfaces Can Be Extendedp. 317
Module 8 Mastery Checkp. 318
Exception Handlingp. 321
The Exception Hierarchyp. 322
Exception Handling Fundamentalsp. 322
Using try and catchp. 323
A Simple Exception Examplep. 324
The Consequences of an Uncaught Exceptionp. 327
Exceptions Enable You to Handle Errors Gracefullyp. 328
Using Multiple catch Statementsp. 330
Catching Subclass Exceptionsp. 331
Try Blocks Can Be Nestedp. 332
Throwing an Exceptionp. 334
Rethrowing an Exceptionp. 334
A Closer Look at Throwablep. 336
Using finallyp. 338
Using throwsp. 340
Java's Built-in Exceptionsp. 342
Creating Exception Subclassesp. 344
Adding Exceptions to the Queue Classp. 347
Module 9 Mastery Checkp. 350
Using I/Op. 353
Java's I/O Is Built upon Streamsp. 354
Byte Streams and Character Streamsp. 354
The Byte Stream Classesp. 355
The Character Stream Classesp. 355
The Predefined Streamsp. 355
Using the Byte Streamsp. 358
Reading Console Inputp. 358
Writing Console Outputp. 360
Reading and Writing Files Using Byte Streamsp. 361
Inputting from a Filep. 362
Writing to a Filep. 364
Reading and Writing Binary Datap. 366
A File Comparison Utilityp. 370
Random Access Filesp. 372
Using Java's Character-Based Streamsp. 375
Console Input Using Character Streamsp. 376
Console Output Using Character Streamsp. 379
File I/O Using Character Streamsp. 381
Using a FileWriterp. 381
Using a FileReaderp. 382
Using Java's Type Wrappers to Convert Numeric Stringsp. 384
Creating a Disk-Based Help Systemp. 387
Module 10 Mastery Checkp. 394
Multithreaded Programmingp. 395
Multithreading Fundamentalsp. 396
The Thread Class and Runnable Interfacep. 397
Creating a Threadp. 398
Some Simple Improvementsp. 401
Extending Threadp. 403
Creating Multiple Threadsp. 406
Determining When a Thread Endsp. 409
Thread Prioritiesp. 412
Synchronizationp. 416
Using Synchronized Methodsp. 416
The synchronized Statementp. 419
Thread Communication Using notify(), wait(), and notifyAll()p. 422
An Example That Uses wait() and notify()p. 423
Suspending, Resuming, and Stopping Threadsp. 428
Using the Main Threadp. 432
Module 11 Mastery Checkp. 434
Applets, Events, and Miscellaneous Topicsp. 435
Applet Basicsp. 436
Applet Organization and Essential Elementsp. 440
The Applet Architecturep. 440
A Complete Applet Skeletonp. 441
Applet Initialization and Terminationp. 442
Requesting Repaintingp. 443
The update() Methodp. 444
A Simple Banner Appletp. 445
Using the Status Windowp. 449
Passing Parameters to Appletsp. 450
The Applet Classp. 452
Event Handlingp. 454
The Delegation Event Modelp. 454
Eventsp. 454
Event Sourcesp. 455
Event Listenersp. 455
Event Classesp. 455
Event Listener Interfacesp. 456
Using the Delegation Event Modelp. 458
Handling Mouse Eventsp. 458
A Simple Mouse Event Appletp. 459
More Java Keywordsp. 462
The transient and volatile Modifiersp. 462
Instanceofp. 463
Strictfpp. 463
Assertp. 463
Native Methodsp. 465
What Next?p. 465
Module 12 Mastery Checkp. 466
Answers to Mastery Checksp. 467
Using Java's Documentation Commentsp. 503
The javadoc Tagsp. 504
@authorp. 505
@deprecatedp. 505
{@docRoot}p. 505
@exceptionp. 506
{@inheritDoc}p. 506
{@link}p. 506
{@linkplain}p. 506
@paramp. 506
@returnp. 507
@seep. 507
@serialp. 507
@serialDatap. 507
@serialFieldp. 508
@sincep. 508
@throwsp. 508
{@value}p. 508
@versionp. 508
The General Form of a Documentation Commentp. 509
What javadoc Outputsp. 509
An Example that Uses Documentation Commentsp. 509
Indexp. 511
Table of Contents provided by Syndetics. All Rights Reserved.