Tải bản đầy đủ (.pdf) (721 trang)

sams teach yourself java 6 in 21 days 5th edition

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (6.28 MB, 721 trang )

www.it-ebooks.info
in 21 Days
Java

6
Sams Teach Yourself
Rogers Cadenhead
Laura Lemay
800 East 96th Street, Indianapolis, Indiana 46240
www.it-ebooks.info
Sams Teach Yourself Java

6 in 21 Days
Copyright © 2007 by Sams Publishing
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmit-
ted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written per-
mission from the publisher. No patent liability is assumed with respect to the use of the information
contained herein. Although every precaution has been taken in the preparation of this book, the pub-
lisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for
damages resulting from the use of the information contained herein.
International Standard Book Number-10: 0-672-32943-3
International Standard Book Number-13: 978-0-672-32943-2
Printed in the United States of America
First Printing: May 2007
10090807 4321
Trademarks
All terms mentioned in this book that are known to be trademarks or service marks have been appro-
priately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term
in this book should not be regarded as affecting the validity of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possible, but no war-


ranty or fitness is implied. The information provided is on an “as is” basis. The author(s) and the
publisher shall have neither liability nor responsibility to any person or entity with respect to any loss
or damages arising from the information contained in this book or from the use of the CD or pro-
grams accompanying it.
Bulk Sales
Sams Publishing offers excellent discounts on this book when ordered in quantity for bulk purchases
or special sales. For more information, please contact
U.S. Corporate and Government Sales
1-800-382-3419

For sales outside of the U.S., please contact
International Sales

Library of Congress Cataloging-in-Publication Data
Cadenhead, Rogers.
Sams teach yourself Java 6 in 21 days / Rogers Cadenhead, Laura Lemay.
p. cm.
Includes index.
ISBN 978-0-672-32943-2 (pbk. w/cd)
1. Java (Computer program language) I. Lemay, Laura. II. Title.
QA76.73.J38C333 2007
005.13'3 dc22
2007014568
Acquisitions Editor
Mark Taber
Development Editor
Songlin Qiu
Managing Editor
Patrick Kanouse
Project Editor

Mandie Frank
Copy Editor
Karen Annett
Indexer
WordWise Publishing
Services, LLC
Proofreader
Language Logistics,
LLC
Technical Editor
Adam DeFields
Publishing
Coordinator
Vanessa Evans
Multimedia
Developer
Dan Scherf
Designer
Gary Adair
Page Layout
Bronkella Publishing,
LLC
www.it-ebooks.info
Contents at a Glance
Introduction 1
WEEK I: The Java Language
1 Getting Started with Java 9
2 The ABCs of Programming 35
3 Working with Objects 63
4 Lists, Logic, and Loops 89

5 Creating Classes and Methods 115
6 Packages, Interfaces, and Other Class Features 145
7 Exceptions, Assertions, and Threads 183
WEEK II: The Java Class Library
8 Data Structures 219
9 Working with Swing 247
10 Building a Swing Interface 273
11 Arranging Components on a User Interface 303
12 Responding to User Input 333
13 Using Color, Fonts, and Graphics 357
14 Developing Swing Applications 381
WEEK III: Java Programming
15 Working with Input and Output 405
16 Serializing and Examining Objects 433
17 Communicating Across the Internet 453
18 Accessing Databases with JDBC 485
19 Reading and Writing RSS Feeds 511
20 XML Web Services 535
21 Writing Java Servlets and Java Server Pages 555
Appendixes
A Using the Java Development Kit 601
B Programming with the Java Development Kit 625
C This Book’s Web Site 649
Index 651
Bonus Material on the Companion CD-ROM
CD1 Choosing Java
CD2 Writing Java Applets
CD3 Regular Expressions
CD4 Where to Go from Here: Java Resources
www.it-ebooks.info

Table of Contents
Introduction 1
How This Book Is Organized 2
Who Should Read This Book
4
Conventions Used in This Book
5
WEEK I: The Java Language
DAY 1: Getting Started with Java 9
The Java Language 10
History of the Language
10
Introduction to Java
11
Selecting a Development Tool
11
Object-Oriented Programming
12
Objects and Classes
14
Attributes and Behavior
17
Attributes of a Class of Objects
17
Behavior of a Class of Objects
18
Creating a Class
19
Running the Program
21

Organizing Classes and Class Behavior
24
Inheritance
24
Creating a Class Hierarchy
26
Inheritance in Action
28
Single and Multiple Inheritance
29
Interfaces
30
Packages
30
Summary
31
Q&A
31
Quiz
32
Questions
32
Answers
32
Certification Practice
32
Exercises
33
www.it-ebooks.info
DAY 2: The ABCs of Programming 35

Statements and Expressions 36
Variables and Data Types
36
Creating Variables
37
Naming Variables
39
Variable Types
39
Assigning Values to Variables
41
Constants
41
Comments
43
Literals
44
Number Literals
45
Boolean Literals
46
Character Literals
46
String Literals
47
Expressions and Operators
48
Arithmetic
49
More About Assignment

51
Incrementing and Decrementing
52
Comparisons
53
Logical Operators
54
Operator Precedence
55
String Arithmetic
57
Summary
58
Q&A
59
Quiz
60
Questions
60
Answers
60
Certification Practice
60
Exercises
61
DAY 3: Working with Objects 63
Creating New Objects 64
Using
new 64
What

new Does 66
A Note on Memory Management
66
www.it-ebooks.info
Accessing and Setting Class and Instance Variables 67
Getting Values
67
Changing Values
68
Class Variables
69
Calling Methods
70
Nesting Method Calls
72
Class Methods
73
References to Objects
74
Casting and Converting Objects and Primitive Types
76
Casting Primitive Types
77
Casting Objects
78
Converting Primitive Types to Objects and Vice Versa
80
Comparing Object Values and Classes
82
Comparing Objects

82
Determining the Class of an Object
84
Summary
84
Q&A
85
Quiz
86
Questions
86
Answers
86
Certification Practice
86
Exercises
87
DAY 4: Lists, Logic, and Loops 89
Arrays 90
Declaring Array Variables
90
Creating Array Objects
91
Accessing Array Elements
92
Changing Array Elements
93
Multidimensional Arrays
95
Block Statements

96
if Conditionals 97
switch Conditionals 98
for Loops 104
vi
Sams Teach Yourself Java 6 in 21 Days
www.it-ebooks.info
while and do Loops 107
while Loops 107
do-while Loops 109
Breaking Out of Loops
109
Labeled Loops
110
The Conditional Operator
110
Summary
112
Q&A
112
Quiz
112
Questions
112
Answers
113
Certification Practice
113
Exercises
114

DAY 5: Creating Classes and Methods 115
Defining Classes 116
Creating Instance and Class Variables
116
Defining Instance Variables
116
Class Variables
117
Creating Methods
117
Defining Methods
118
The
this Keyword 120
Variable Scope and Method Definitions
121
Passing Arguments to Methods
122
Class Methods
123
Creating Java Applications
124
Helper Classes
125
Java Applications and Command-line Arguments
126
Passing Arguments to Java Applications
126
Handling Arguments in Your Java Application
127

Creating Methods with the Same Name, Different Arguments
128
Constructor Methods
132
Basic Constructor Methods
133
Calling Another Constructor Method
133
Overloading Constructor Methods
134
Contents
vii
www.it-ebooks.info
Overriding Methods 136
Creating Methods That Override Existing Methods
136
Calling the Original Method
137
Overriding Constructors
138
Finalizer Methods
140
Summary
141
Q&A
141
Quiz
142
Questions
142

Answers
143
Certification Practice
143
Exercises
144
DAY 6: Packages, Interfaces, and Other Class Features 145
Modifiers 146
Access Control for Methods and Variables
146
Static Variables and Methods
152
Final Classes, Methods, and Variables
154
Variables
155
Methods
155
Classes
156
Abstract Classes and Methods
156
Packages
157
Using Packages
157
Full Package and Class Names
158
The
import Declaration 159

Class Name Conflicts
160
A Note About
Classpath and Where Classes Are Located 161
Creating Your Own Packages
162
Picking a Package Name
162
Creating the Folder Structure
162
Adding a Class to a Package
163
Packages and Class Access Control
163
Interfaces
164
The Problem of Single Inheritance
164
Interfaces and Classes
164
viii
Sams Teach Yourself Java 6 in 21 Days
www.it-ebooks.info
Implementing and Using Interfaces 165
Implementing Multiple Interfaces
165
Other Uses of Interfaces
166
Creating and Extending Interfaces
166

New Interfaces
166
Methods Inside Interfaces
167
Extending Interfaces
168
Creating an Online Storefront
169
Inner Classes
175
Summary
177
Q&A
178
Quiz
179
Questions
179
Answers
179
Certification Practice
179
Exercises
181
DAY 7: Exceptions, Assertions, and Threads 183
Exceptions 184
Exception Classes
186
Managing Exceptions
187

Exception Consistency Checking
188
Protecting Code and Catching Exceptions
188
The
finally Clause 190
Declaring Methods That Might Throw Exceptions
193
The
throws Clause 193
Which Exceptions Should You Throw?
194
Passing On Exceptions
195
throws and Inheritance 196
Creating and Throwing Your Own Exceptions
197
Throwing Exceptions
197
Creating Your Own Exceptions
198
Combining
throws, try, and throw 199
Contents
ix
www.it-ebooks.info
When and When Not to Use Exceptions 200
When to Use Exceptions
200
When Not to Use Exceptions

200
Bad Style Using Exceptions
201
Assertions
202
Threads
205
Writing a Threaded Program
206
A Threaded Application
207
Stopping a Thread
211
Summary
212
Q&A
213
Quiz
214
Questions
214
Answers
215
Certification Practice
215
Exercises
216
WEEK II: The Java Class Library
DAY 8: Data Structures 219
Moving Beyond Arrays 220

Java Structures
220
Iterator 222
Bit Sets
223
Vectors
226
Looping Through Data Structures
229
Stacks
232
Map 233
Hash Tables
235
Generics
240
Summary
243
Q&A
244
Quiz
244
Questions
244
Answers
245
Certification Practice
245
Exercises
246

x
Sams Teach Yourself Java 6 in 21 Days
www.it-ebooks.info
DAY 9: Working with Swing 247
Creating an Application 248
Creating an Interface
249
Developing a Framework
251
Displaying a Splash Page
253
Creating a Component
253
Adding Components to a Container
254
Working with Components
256
Image Icons
257
Labels
259
Text Fields
259
Text Areas
260
Scrolling Panes
262
Check Boxes and Radio Buttons
263
Combo Boxes

266
Lists
267
Summary
269
Q&A
270
Quiz
270
Questions
270
Answers
271
Certification Practice
271
Exercises
272
DAY 10: Building a Swing Interface 273
Swing Features 274
Setting the Look and Feel
274
Standard Dialog Boxes
277
Using Dialog Boxes
282
Sliders
285
Scroll Panes
287
Toolbars

288
Progress Bars
291
Menus
293
Tabbed Panes
297
Contents
xi
www.it-ebooks.info
Summary 298
Q&A
299
Quiz
299
Questions
299
Answers
300
Certification Practice
300
Exercises
301
DAY 11: Arranging Components on a User Interface 303
Basic Interface Layout 304
Laying Out an Interface
304
Flow Layout
305
Box Layout

307
Grid Layout
309
Border Layout
311
Mixing Layout Managers
312
Card Layout
313
Using Card Layout in an Application
315
Grid Bag Layout
321
Designing the Grid
323
Creating the Grid
324
Cell Padding and Insets
329
Summary
329
Q&A
330
Quiz
331
Questions
331
Answers
331
Certification Practice

331
Exercises
332
DAY 12: Responding to User Input 333
Event Listeners 334
Setting Up Components
335
Event-Handling Methods
336
xii
Sams Teach Yourself Java 6 in 21 Days
www.it-ebooks.info
Working with Methods 338
Action Events
339
Focus Events
340
Item Events
342
Key Events
344
Mouse Events
345
Mouse Motion Events
345
Window Events
349
Using Adapter Classes
350
Summary

351
Q&A
352
Quiz
353
Questions
353
Answers
353
Certification Practice
353
Exercises
355
DAY 13: Using Color, Fonts, and Graphics 357
The Graphics2D Class 358
The Graphics Coordinate System
359
Drawing Text
360
Improving Fonts and Graphics with Antialiasing
362
Finding Information About a Font
363
Color
365
Using
Color Objects 366
Testing and Setting the Current Colors
366
Drawing Lines and Polygons

368
User and Device Coordinate Spaces
368
Specifying the Rendering Attributes
368
Creating Objects to Draw
371
Drawing Objects
375
Summary
378
Q&A
378
Contents
xiii
www.it-ebooks.info
Quiz 379
Questions
379
Answers
379
Certification Practice
379
Exercises
380
DAY 14: Developing Swing Applications 381
Java Web Start 382
Using Java Web Start
385
Creating a JNLP File

386
Supporting Web Start on a Server
391
Additional JNLP Elements
392
Improving Performance with
SwingWorker 394
Summary
399
Q&A
400
Quiz
400
Questions
400
Answers
401
Certification Practice
401
Exercises
402
WEEK III: Java Programming
DAY 15: Working with Input and Output 405
Introduction to Streams 406
Using a Stream
406
Filtering a Stream
407
Handling Exceptions
408

Byte Streams
408
File Streams
408
Filtering a Stream
413
Byte Filters
413
Character Streams
422
Reading Text Files
422
Writing Text Files
425
xiv
Sams Teach Yourself Java 6 in 21 Days
www.it-ebooks.info
Files and Filename Filters 426
Summary
429
Q&A
430
Quiz
431
Questions
431
Answers
431
Certification Practice
432

Exercises
432
DAY 16: Serializing and Examining Objects 433
Object Serialization 434
Object Output Streams
435
Object Input Streams
438
Transient Variables
441
Checking an Object’s Serialized Fields
442
Inspecting Classes and Methods with Reflection
443
Inspecting and Creating Classes
443
Working with Each Part of a Class
445
Inspecting a Class
447
Summary
449
Q&A
449
Quiz
450
Questions
451
Answers
450

Certification Practice
451
Exercises
452
DAY 17: Communicating Across the Internet 453
Networking in Java 454
Opening a Stream over the Net
454
Sockets
459
Socket Servers
463
Testing the Server
466
The
java.nio Package 467
Buffers
467
Channels
471
Contents
xv
www.it-ebooks.info
Summary 481
Q&A
481
Quiz
482
Questions
482

Answers
482
Certification Practice
483
Exercises
483
DAY 18: Accessing Databases with JDBC 485
Java Database Connectivity 486
Database Drivers
487
The JDBC-ODBC Bridge
487
Connecting to an ODBC Data Source
489
JDBC Drivers
502
Summary
507
Q&A
508
Quiz
508
Questions
508
Answers
509
Certification Practice
509
Exercises
510

DAY 19: Reading and Writing RSS Feeds 511
Using XML 512
Designing an XML Dialect
515
Processing XML with Java
516
Processing XML with XOM
516
Creating an XML Document
518
Modifying an XML Document
521
Formatting an XML Document
525
Evaluating XOM
528
Summary
530
Q&A
531
Quiz
531
Questions
531
Answers
532
Certification Practice
532
Exercises
533

xvi
Sams Teach Yourself Java 6 in 21 Days
www.it-ebooks.info
DAY 20: XML Web Services 535
Introduction to XML-RPC 536
Communicating with XML-RPC
537
Sending a Request
538
Responding to a Request
539
Choosing an XML-RPC Implementation
540
Using an XML-RPC Web Service
542
Creating an XML-RPC Web Service
546
Summary
551
Q&A
551
Quiz
552
Questions
552
Answers
552
Certification Practice
552
Exercises

553
DAY 21: Writing Java Servlets and Java Server Pages 555
Using Servlets 556
Developing Servlets
559
Using Cookies
565
Using Sessions
568
JSP
572
Writing a JSP Page
574
Creating a Web Application
581
JSP Standard Tag Library
587
Summary
594
Q&A
595
Quiz
596
Questions
596
Answers
596
Certification Practice
597
Exercises

597
Appendixes
APPENDIX A: Using the Java Development Kit 601
Choosing a Java Development Tool 602
Installing the Java Development Kit
603
Contents
xvii
www.it-ebooks.info
Configuring the Java Development Kit 605
Using a Command-line Interface
606
Opening Folders in MS-DOS
607
Creating Folders in MS-DOS
608
Running Programs in MS-DOS
609
Correcting Configuration Errors
611
Using a Text Editor
615
Creating a Sample Program
616
Compiling and Running the Program in Windows
618
Setting Up the
CLASSPATH Variable 620
Setting the
CLASSPATH on Windows 98 or Me 620

Setting the
Classpath on Windows NT, XP, 2000 or 2003 622
Troubleshooting Your Kit Installation
624
APPENDIX B: Programming with the Java Development Kit 625
An Overview of the JDK 626
The
java Interpreter 627
The
javac Compiler 629
The
appletviewer Browser 630
The
javadoc Documentation Tool 635
The
jar Java File Archival Tool 639
The
jdb Debugger 641
Debugging Applications
641
Debugging Applets
643
Advanced Debugging Commands
644
Using System Properties
645
APPENDIX C: This Book’s Website 649
Index 651
Bonus Material on the Companion CD-ROM
CD1 Choosing Java

CD2 Writing Java Applets
CD3 Regular Expressions
CD4 Where to Go from Here: Java Resources
xviii
Sams Teach Yourself Java 6 in 21 Days
www.it-ebooks.info
About the Authors
Rogers Cadenhead is a web application developer and author. He has written 22 books
on Internet-related topics, including Sams Teach Yourself Java in 24 Hours. He’s also a
web publisher whose sites receive more than 24 million visits per year. He maintains this
book’s official website at and a personal weblog at
.
Laura Lemay is a technical writer and author. After spending six years writing software
documentation for various computer companies in Silicon Valley, she decided that writ-
ing books would be much more fun. In her spare time, she collects computers, email
addresses, interesting hair colors, and nonrunning motorcycles. She is also the perpetra-
tor of Sams Teach Yourself Web Publishing with HTML in a Week and Sams Teach
Yourself Perl in 21 Days and a personal weblog at
Dedication
To my sons Max, Eli, and Sam Cadenhead. I am extremely proud to be your dad,
no matter what you tell your mother about my cooking.
—Rogers
To Eric, for all the usual reasons (moral support, stupid questions,
comfort in dark times, brewing big pots of coffee).
—LL
www.it-ebooks.info
Acknowledgments
From Rogers Cadenhead:
A book of this scope (and heft!) requires the hard work and dedication of numerous peo-
ple. Most of them are at Sams Publishing in Indianapolis, and to them I owe considerable

thanks—in particular, to Karen Annett, Adam DeFields, Mandie Frank, Songlin Qiu,
Mark Taber, and former Sams editor, Scott Meyers. Thanks also to my agent at Studio B,
Laura Lewin. Most of all, thanks to my wife and sons.
I’d also like to thank readers who have sent helpful comments about corrections, typos,
and suggested improvements regarding this book and its prior editions. The list includes
the following people: Dave Barton, Patrick Benson, Ian Burton, Lawrence Chang, Jim
DeVries, Ryan Esposto, Kim Farr, Sam Fitzpatrick, Bruce Franz, Owen Gailar, Rich
Getz, Bob Griesemer, Jenny Guriel, Brenda Henry-Sewell, Ben Hensley, Jon Hereng,
Drew Huber, John R Jackson, Bleu Jaegel, Natalie Kehr, Mark Lehner, Stephen
Loscialpo, Brad Kaenel, Chris McGuire, Paul Niedenzu, E.J. O’Brien, Chip Pursell,
Pranay Rajgarhia, Peter Riedlberger, Darrell Roberts, Luke Shulenburger, Mike Tomsic,
John Walker, Joseph Walsh, Mark Weiss, P.C. Whidden, Chen Yan, Kyu Hwang Yeon,
and J-F. Zurcher.
From Laura Lemay:
To the folks on Sun’s Java team, for all their hard work on Java, the language, and on the
browser, and particularly to Jim Graham, who demonstrated Java and HotJava to me on
very short notice and planted the idea for this book. To everyone who bought my previ-
ous books and liked them: Buy this one, too.
www.it-ebooks.info
We Want to Hear from You!
As the reader of this book, you are our most important critic and commentator. We value
your opinion and want to know what we’re doing right, what we could do better, what
areas you’d like to see us publish in, and any other words of wisdom you’re willing to
pass our way.
You can email or write me directly to let me know what you did or didn’t like about this
book—as well as what we can do to make our books stronger.
Please note that I cannot help you with technical problems related to the topic of this
book and that due to the high volume of mail I receive, I might not be able to reply to
every message.
When you write, please be sure to include this book’s title and author as well as your

name and phone or email address. I will carefully review your comments and share them
with the author and editors who worked on the book.
E-mail:
Mail: Mark Taber
Associate Publisher
Sams Publishing
800 East 96th Street
Indianapolis, IN 46240 USA
Reader Services
Visit our website and register this book at www.samspublishing.com/register for conve-
nient access to any updates, downloads, or errata that might be available for this book.
www.it-ebooks.info
This page intentionally left blank
www.it-ebooks.info
Introduction
Some revolutions catch the world completely by surprise. The World Wide Web, the
Linux operating system, and social networking all rose to prominence unexpectedly.
The remarkable success of the Java programming language, on the other hand, caught no
one by surprise. Java has been the source of great expectations since its introduction a
decade ago. When Sun Microsystems launched Java by incorporating it into web
browsers, a torrent of publicity welcomed the arrival of the new language.
Sun cofounder Bill Joy didn’t hedge his bets at all when describing the company’s new
language. “This represents the end result of nearly 15 years of trying to come up with a
better programming language and environment for building simpler and more reliable
software,” he proclaimed.
In the ensuing years, Java lived up to a considerable amount of its hype. The language
has become as strong a part of software development as the beverage of the same name.
One kind of Java keeps programmers up nights. The other kind enables programmers to
rest easier after they have developed their software.
Java was originally offered as a technology for enhancing websites with programs that

run in web browsers. Today, it’s more likely to be found on servers, driving dynamic web
applications backed by relational databases on some of the Web’s largest sites.
Each new release of Java strengthens its capabilities as a general-purpose programming
language for environments other than a web browser. Today, Java is being put to use in
desktop applications, Internet servers, personal digital assistants, embedded devices, and
many other environments.
Now in its seventh major release—Java 6—the Java language has matured into a full-fea-
tured competitor to other general-purpose development languages, such as C++, Perl,
Python, Ruby, and Visual Basic.
You might be familiar with Java programming tools, such as Eclipse, Borland JBuilder,
and the NetBeans Integrated Development Environment. These programs make it possi-
ble to develop functional Java programs, and you also can use Sun’s Java Development
Kit. The kit, which is available for free on the Web at , is a set of
command-line tools for writing, compiling, and testing Java programs.
www.it-ebooks.info
In Sams Teach Yourself Java 6 in 21 Days, you are introduced to all aspects of Java soft-
ware development using the most current version of the language and the best available
techniques.
By the time you’re finished, you’ll be well acquainted with the reasons Java has become
the most widely adopted programming language of the past decade.
How This Book Is Organized
Sams Teach Yourself Java 6 in 21 Days teaches you about the Java language and how to
use it to create applications for any computing environment and servlets that run on web
servers. By the time you have finished the book, you’ll have a well-rounded knowledge
of Java and the Java class libraries. Using your new skills, you will be able to develop
your own programs for tasks such as web services, database connectivity, XML process-
ing, and client/server programming.
You learn by doing in this book, creating several programs each day that demonstrate the
topics being introduced. The source code for all these programs is available on the
book’s official website at , along with other supplemental

material such as answers to reader questions.
This book covers the Java language and its class libraries in 21 days, organized as three
separate weeks. Each week covers a broad area of developing Java applets and applica-
tions.
In the first week, you learn about the Java language itself:
n
Day 1 covers the basics—what Java is, why to learn the language, and how to cre-
ate software using an innovative style of development called object-oriented pro-
gramming. You create your first Java application.
n
On Day 2, you dive into the fundamental Java building blocks—data types, vari-
ables, and expressions.
n
Day 3 goes into detail about how to deal with objects in Java—how to create them,
use their variables, call their methods, and compare them.
n
On Day 4, you give Java programs cognitive skills using conditionals and work
with arrays and loops.
n
Day 5 fully explores the creation of classes—the basic building blocks of any Java
program.
n
On Day 6, you discover more about interfaces and packages, which are useful for
grouping classes and organizing a class hierarchy.
2
Sams Teach Yourself Java 6 in 21 Days
www.it-ebooks.info

×