did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780321349804

The Java Programming Language

by ; ;
  • ISBN13:

    9780321349804

  • ISBN10:

    0321349806

  • Edition: 4th
  • Format: Paperback
  • Copyright: 2005-08-17
  • Publisher: Savvas Learning Company

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $58.79 Save up to $23.52
  • Rent Book $35.27
    Add to Cart Free Shipping Icon Free Shipping

    TERM
    PRICE
    DUE
    USUALLY SHIPS IN 24-48 HOURS
    *This item is part of an exclusive publisher rental program and requires an additional convenience fee. This fee will be reflected in the shopping cart.

Supplemental Materials

What is included with this book?

Summary

Direct from the creators of the Java programming language, the completely revised fourth edition of The Java Programming Language is an indispensable resource for novice and advanced programmers alike.

Author Biography

Ken Arnold, formerly senior engineer at Sun Microsystems Laboratories, is a leading expert in object-oriented design and implementation James Gosling is a Sun Fellow and CTO of Sun Microsystems' Developer Platform Group David Holmes is director of DLTeCH Pty Ltd, located in Brisbane, Australia

Table of Contents

Preface xxi
A Quick Tour
1(40)
Getting Started
1(2)
Variables
3(3)
Comments in Code
6(1)
Named Constants
7(1)
Unicode Characters
8(1)
Flow of Control
9(3)
Classes and Objects
12(3)
Creating Objects
13(1)
Static or Class Fields
14(1)
The Garbage Collector
15(1)
Methods and Parameters
15(3)
Invoking a Method
15(2)
The this Reference
17(1)
Static or Class Methods
17(1)
Arrays
18(3)
String Objects
21(3)
String Conversion and Formatting
23(1)
Extending a Class
24(3)
Invoking Methods of the Superclass
25(1)
The Object Class
26(1)
Type Casting
27(1)
Interfaces
27(2)
Generic Types
29(3)
Exceptions
32(3)
Annotations
35(1)
Packages
36(2)
The Java Platform
38(1)
Other Topics Briefly Noted
39(2)
Classes and Objects
41(34)
A Simple Class
42(2)
Class Members
42(1)
Class Modifiers
43(1)
Fields
44(3)
Field Initialization
44(1)
Static Fields
45(1)
final Fields
46(1)
Access Control
47(2)
Creating Objects
49(1)
Construction and Initialization
50(6)
Constructors
50(4)
Initialization Blocks
54(1)
Static Initialization
55(1)
Methods
56(12)
Static Methods
58(1)
Method Invocations
58(2)
Methods with Variable Numbers of Arguments
60(2)
Method Execution and Return
62(1)
Parameter Values
63(2)
Using Methods to Control Access
65(3)
this
68(1)
Overloading Methods
69(2)
Importing Static Member Names
71(2)
The main Method
73(1)
Native Methods
74(1)
Extending Classes
75(42)
An Extended Class
76(4)
Constructors in Extended Classes
80(4)
Constructor Order Dependencies
81(3)
Inheriting and Redefining Members
84(6)
Overriding
84(2)
Hiding Fields
86(1)
Accessing Inherited Members
86(2)
Accessibility and Overriding
88(1)
Hiding Static Members
89(1)
The super Keyword
89(1)
Type Compatibility and Conversion
90(3)
Compatibility
90(1)
Explicit Type Casting
91(1)
Testing for Type
92(1)
What protected Really Means
93(3)
Marking Methods and Classes final
96(1)
Abstract Classes and Methods
97(2)
The Object Class
99(2)
Cloning Objects
101(6)
Strategies for Cloning
101(2)
Correct Cloning
103(3)
Shallow versus Deep Cloning
106(1)
Extending Classes: How and When
107(1)
Designing a Class to Be Extended
108(6)
Designing an Extensible Framework
109(5)
Single Inheritance versus Multiple Inheritance
114(3)
Interfaces
117(16)
A Simple Interface Example
118(2)
Interface Declarations
120(2)
Interface Constants
121(1)
Interface Methods
122(1)
Interface Modifiers
122(1)
Extending Interfaces
122(4)
Inheriting and Hiding Constants
123(2)
Inheriting, Overriding, and Overloading Methods
125(1)
Working with Interfaces
126(4)
Implementing Interfaces
127(2)
Using an Implementation
129(1)
Marker Interfaces
130(1)
When to Use Interfaces
131(2)
Nested Classes and Interfaces
133(18)
Static Nested Types
133(3)
Static Nested Classes
134(1)
Nested Interfaces
135(1)
Inner Classes
136(6)
Accessing Enclosing Objects
138(1)
Extending Inner Classes
139(1)
Inheritance, Scoping, and Hiding
140(2)
Local Inner Classes
142(2)
Inner Classes in Static Contexts
144(1)
Anonymous Inner Classes
144(2)
Inheriting Nested Types
146(2)
Nesting in Interfaces
148(1)
Modifiable Variables in Interfaces
149(1)
Implementation of Nested Types
149(2)
Enumeration Types
151(10)
A Simple Enum Example
151(1)
Enum Declarations
152(2)
Enum Modifiers
154(1)
Enum Constant Declarations
154(5)
Construction
155(1)
Constant Specific Behavior
156(3)
java. lang. Enum
159(1)
To Enum or Not
160(1)
Tokens, Values, and Variables
161(22)
Lexical Elements
161(5)
Character Set
161(2)
Comments
163(1)
Tokens
164(1)
Identifiers
164(1)
Keywords
165(1)
Types and Literals
166(3)
Reference Literals
167(1)
Boolean Literals
167(1)
Character Literals
167(1)
Integer Literals
167(1)
Floating-Point Literals
168(1)
String Literals
168(1)
Class Literals
169(1)
Variables
169(4)
Field and Local Variable Declarations
170(1)
Parameter Variables
171(1)
final Variables
171(2)
Array Variables
173(5)
Array Modifiers
174(1)
Arrays of Arrays
174(1)
Array Initialization
175(2)
Arrays and Types
177(1)
The Meanings of Names
178(5)
Primitives as Types
183(18)
Common Fields and Methods
184(3)
Construction
185(1)
Constants
185(1)
Common Methods
186(1)
Void
187(1)
Boolean
187(1)
Number
188(4)
The Integer Wrappers
188(3)
The Floating-Point Wrapper Classes
191(1)
Character
192(6)
Working with UTF-16
196(2)
Boxing Conversions
198(3)
Operators and Expressions
201(28)
Arithmetic Operations
201(3)
Integer Arithmetic
202(1)
Floating-Point Arithmetic
202(1)
Strict and Non-Strict Floating-Point Arithmetic
203(1)
General Operators
204(10)
Increment and Decrement Operators
205(1)
Relational and Equality Operators
206(1)
Logical Operators
207(1)
instanceof
208(1)
Bit Manipulation Operators
208(2)
The Conditional Operator ?
210(2)
Assignment Operators
212(2)
String Concatenation Operator
214(1)
new
214(1)
Expressions
214(2)
Order of Evaluation
214(1)
Expression Type
215(1)
Type Conversions
216(5)
Implicit Type Conversions
216(3)
Explicit Type Casts
219(1)
String Conversions
220(1)
Operator Precedence and Associativity
221(2)
Member Access
223(6)
Finding the Right Method
224(5)
Control Flow
229(18)
Statements and Blocks
229(1)
if--else
230(2)
switch
232(3)
while and do--while
235(1)
for
236(5)
Basic for Statement
236(3)
Enhanced for Statement
239(2)
Labels
241(1)
break
241(3)
continue
244(1)
return
245(1)
What, No goto?
246(1)
Generic Types
247(32)
Generic Type Declarations
250(6)
Bounded Type Parameters
252(1)
Nested Generic Types
253(3)
Working with Generic Types
256(4)
Subtyping and Wildcards
256(4)
Generic Methods and Constructors
260(4)
Generic Invocations and Type Inference
262(2)
Wildcard Capture
264(3)
Under the Hood: Erasure and Raw Types
267(5)
Erasure at Runtime
267(4)
Overloading and Overriding
271(1)
Finding the Right Method---Revisited
272(4)
Class Extension and Generic Types
276(3)
Exceptions and Assertions
279(26)
Creating Exception Types
280(2)
throw
282(1)
Transfer of Control
283(1)
Asynchronous Exceptions
283(1)
The throws Clause
283(3)
throws Clauses and Method Overriding
285(1)
throws Clauses and Native Methods
286(1)
try, catch, and finally
286(5)
finally
288(3)
Exception Chaining
291(3)
Stack Traces
294(1)
When to Use Exceptions
294(2)
Assertions
296(1)
The assert Statement
297(1)
When to Use Assertions
297(3)
State Assertions
297(2)
Control Flow Assertions
299(1)
Turning Assertions On and Off
300(5)
Why Turn Assertions On and Off?
300(1)
Controlling Assertions on the Command Line
300(2)
Complete Removal
302(1)
Making Assertions Required
302(3)
Strings and Regular Expressions
305(32)
Character Sequences
305(1)
The String Class
306(15)
Basic String Operations
306(2)
String Comparisons
308(3)
String Literals, Equivalence and Interning
311(2)
Making Related Strings
313(3)
String Conversions
316(1)
Strings and char Arrays
317(2)
Strings and byte Arrays
319(1)
Character Set Encoding
320(1)
Regular Expression Matching
321(9)
Regular Expressions
321(2)
Compiling and Matching with Regular Expressions
323(3)
Replacing
326(3)
Regions
329(1)
Efficiency
329(1)
The StringBuilder Class
330(6)
Modifying the Buffer
331(2)
Getting Data Out
333(1)
Capacity Management
334(1)
The StringBuffer Class
335(1)
Working with UTF-16
336(1)
Threads
337(50)
Creating Threads
339(2)
Using Runnable
341(4)
Synchronization
345(9)
synchronized Methods
346(2)
Static synchronized Methods
348(1)
synchronized Statements
348(4)
Synchronization Designs
352(2)
wait, notifyAll, and notify
354(3)
Details of Waiting and Notification
357(1)
Thread Scheduling
358(4)
Voluntary Rescheduling
360(2)
Deadlocks
362(3)
Ending Thread Execution
365(4)
Cancelling a Thread
365(2)
Waiting for a Thread to Complete
367(2)
Ending Application Execution
369(1)
The Memory Model: Synchronization and volatile
370(5)
Synchronization Actions
372(1)
Final Fields and Security
373(1)
The Happens-Before Relationship
374(1)
Thread Management, Security, and ThreadGroup
375(4)
Threads and Exceptions
379(3)
Don't stop
381(1)
Stack Traces
382(1)
ThreadLocal Variables
382(2)
Debugging Threads
384(3)
Annotations
387(10)
A Simple Annotation Example
388(1)
Annotation Types
389(3)
Annotating Elements
392(1)
Restricting Annotation Applicability
393(2)
Retention Policies
395(1)
Working with Annotations
395(2)
Reflection
397(50)
The Class Class
399(15)
Type Tokens
400(2)
Class Inspection
402(6)
Examining Class Members
408(3)
Naming Classes
411(2)
Obtaining Class Objects by Name
413(1)
Runtime Type Queries
414(1)
Annotation Queries
414(2)
The Modifier Class
416(1)
The Member classes
416(1)
Access Checking and AccessibleObject
417(1)
The Field Class
418(2)
Final Fields
420(1)
The Method Class
420(3)
Creating New Objects and the Constructor Class
423(3)
Inner Class Constructors
425(1)
Generic Type Inspection
426(3)
Type Variables
426(1)
Parameterized Types
427(1)
Wildcards
428(1)
Generic Arrays
428(1)
String Representations of Type Objects
428(1)
Arrays
429(3)
Genericity and Dynamic Arrays
430(2)
Packages
432(1)
The Proxy Class
432(3)
Loading Classes
435(9)
The ClassLoader Class
438(3)
Preparing a Class for Use
441(1)
Loading Related Resources
442(2)
Controlling Assertions at Runtime
444(3)
Garbage Collection and Memory
447(20)
Garbage Collection
447(1)
A Simple Model
448(1)
Finalization
449(3)
Resurrecting Objects during finalize
452(1)
Interacting with the Garbage Collector
452(2)
Reachability States and Reference Objects
454(13)
The Reference Class
455(1)
Strengths of Reference and Reachability
455(4)
Reference Queues
459(5)
Finalization and Reachability
464(3)
Packages
467(14)
Package Naming
468(1)
Type Imports
469(2)
Package Access
471(4)
Accessibility and Overriding Methods
472(3)
Package Contents
475(1)
Package Annotations
476(1)
Package Objects and Specifications
477(4)
Documentation Comments
481(18)
The Anatomy of a Doc Comment
482(1)
Tags
483(6)
@see
483(1)
{@link} and {@linkplain}
484(1)
@param
485(1)
@return
485(1)
@throws and @exception
485(1)
@deprecated
486(1)
@author
486(1)
@version
487(1)
@since
487(1)
{@literal} and {@code}
487(1)
{@value}
487(1)
{@docRoot}
488(1)
{@inheritDoc}
488(1)
Inheriting Method Documentation Comments
489(2)
Inheriting @throws Comments
490(1)
A Simple Example
491(5)
External Conventions
496(1)
Package and Overview Documentation
496(1)
The doc-files Directory
497(1)
Notes on Usage
497(2)
The I/O Package
499(68)
Streams Overview
500(1)
Byte Streams
501(6)
InputStream
503(2)
OutputStream
505(2)
Character Streams
507(5)
Reader
508(2)
Writer
510(1)
Character Streams and the Standard Streams
511(1)
InputStreamReader and OutputStreamWriter
512(2)
A Quick Tour of the Stream Classes
514(23)
Synchronization and Concurrency
515(1)
Filter Streams
516(2)
Buffered Streams
518(2)
Piped Streams
520(1)
ByteArray Byte Streams
521(1)
CharArray Character Streams
522(1)
String Character Streams
523(2)
Print Streams
525(2)
LineNumberReader
527(1)
SequenceInputStream
528(1)
Pushback Streams
529(3)
StreamTokenizer
532(5)
The Data Byte Streams
537(3)
DataInput and DataOutput
537(2)
The Data Stream Classes
539(1)
Working with Files
540(9)
File Streams and FileDescriptor
540(1)
RandomAccessFile
541(2)
The File Class
543(5)
FilenameFilter and FileFilter
548(1)
Object Serialization
549(14)
The Object Byte Streams
549(2)
Making Your Classes Serializable
551(1)
Serialization and Deserialization Order
552(2)
Customized Serialization
554(3)
Object Versioning
557(2)
Serialized Fields
559(2)
The Externalizable Interface
561(1)
Documentation Comment Tags
562(1)
The IOException Classes
563(2)
A Taste of New I/O
565(2)
Collections
567(56)
Collections
567(4)
Exception Conventions
570(1)
Interation
571(3)
Ordering with Comparable and Comparator
574(1)
The Collection Interface
575(2)
Set and SortedSet
577(3)
HashSet
579(1)
LinkedHashSet
580(1)
TreeSet
580(1)
List
580(5)
ArrayList
582(1)
LinkedList
583(1)
RandomAccess Lists
584(1)
Queue
585(2)
PriorityQueue
586(1)
Map and SortedMap
587(7)
HashMap
590(1)
LinkedHashMap
591(1)
IdentityHashMap
592(1)
WeakHashMap
592(1)
TreeMap
593(1)
enum Collections
594(3)
EnumSet
594(2)
EnumMap
596(1)
Wrapped Collections and the Collections Class
597(5)
The Collections Utilities
597(4)
The Unmodifiable Wrappers
601(1)
The Checked Wrappers
601(1)
Synchronized Wrappers and Concurrent Collections
602(5)
The Synchronized Wrappers
602(2)
The Concurrent Collections
604(3)
The Arrays Utility Class
607(2)
Writing Iterator Implementations
609(2)
Writing Collection Implementations
611(5)
The Legacy Collection Types
616(4)
Enumeration
617(1)
Vector
617(2)
Stack
619(1)
Dictionary
619(1)
Hashtable
619(1)
Properties
620(3)
Miscellaneous Utilities
623(38)
Formatter
624(8)
Format Specifiers
626(1)
Integer Conversions
627(1)
Floating-Point Conversions
627(2)
Character Conversions
629(1)
General Conversions
629(1)
Custom Formatting
630(1)
Format Exceptions
630(1)
The Formatter Class
631(1)
BitSet
632(3)
Observer/Observable
635(4)
Random
639(2)
Scanner
641(10)
Stream of Values
641(3)
Scanning Lines
644(3)
Using Scanner
647(4)
Localization
651(1)
StringTokenizer
651(2)
Timer and TimerTask
653(3)
UUID
656(1)
Math and StrictMath
657(4)
System Programming
661(24)
The System Class
662(4)
Standard I/O Streams
662(1)
System Properties
663(2)
Utility Methods
665(1)
Creating Processes
666(6)
Process
667(2)
Process Environments
669(1)
ProcessBuilder
670(2)
Portability
672(1)
Shutdown
672(3)
Shutdown Hooks
672(2)
The Shutdown Sequence
674(1)
Shutdown Strategies
674(1)
The Rest of Runtime
675(2)
Loading Native Code
676(1)
Debugging
676(1)
Security
677(8)
The SecurityManager Class
678(1)
Permissions
679(1)
Security Policies
680(1)
Access Controllers and Privileged Execution
681(4)
Internationalization and Localization
685(30)
Locale
686(2)
Resource Bundles
688(6)
ListResourceBundle
691(1)
PropertyResourceBundle
692(1)
Subclassing ResourceBundle
693(1)
Currency
694(1)
Time, Dates, and Calendars
695(8)
Calendars
695(5)
Time Zones
700(1)
GregorianCalendar and SimpleTimeZone
701(2)
Formatting and Parsing Dates and Times
703(5)
Using Formatter with Dates and Times
706(2)
Internationalization and Localization for Text
708(7)
Collation
708(2)
Formatting and Parsing
710(2)
Text Boundaries
712(3)
Standard Packages
715(26)
java.awt---The Abstract Window Toolkit
717(3)
java.applet---Applets
720(1)
java.beans---Components
721(1)
java.math---Mathematics
722(2)
java.net---The Network
724(3)
java.rmi---Remote Method Invocation
727(5)
java.security and Related Packages---Security Tools
732(1)
java.sql---Relational Database Access
732(1)
Utility Subpackages
733(4)
Concurrency Utilities---java.util.concurrent
733(2)
Archive Files---java.util.jar
735(1)
ZIP Files---java.util.zip
736(1)
javax.*---Standard Extensions
737(1)
javax.accessibility---Accessibility for GUIs
737(1)
javax.naming---Directory and Naming Services
738(1)
javax.sound---Sound Manipulation
739(1)
javax.swing---Swing GUI Components
740(1)
org.omg. CORBA---CORBA APIs
740(1)
A Application Evolution
741(8)
A.1 Language, Library, and Virtual Machine Versions
741(2)
A.2 Dealing with Multiple Dialects
743(1)
A.3 Generics: Reification, Erasure, and Raw Types
744(5)
A.3.1 Raw Types, ``Unchecked'' Warnings, and Bridge Methods
745(2)
A.3.2 API Issues
747(2)
B Useful Tables
749(6)
Further Reading 755(6)
Index 761

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

Beautiful buildings are more than scientific. They are true organisms,spiritually conceived; works of art, using the best technology by inspiration rather than the idiosyncrasies of mere taste or any averaging by the committee mind. --Frank Lloyd Wright The Java programming language has been warmly received by the world community of software developers and Internet content providers. Users of the Internet and World Wide Web benefit from access to secure, platform-independent applications that can come from anywhere on the Internet. Software developers who create applications in the Java programming language benefit by developing code only once, with no need to "port" their applications to every software and hardware platform. For many, the language was known first as a tool to create applets for the World Wide Web. Anappletis a mini-application that runs inside a Web page. An applet can perform tasks and interact with users on their browser pages without using resources from the Web server after being downloaded. Some applets may, of course, talk with the server to do their job, but that's their business. The Java programming language is indeed valuable for distributed network environments like the Web. However, it goes well beyond this domain to provide a powerful general-purpose programming language suitable for building a variety of applications that either do not depend on network features or want them for different reasons. The ability to execute downloaded code on remote hosts in a secure manner is a critical requirement for many organizations. Other groups use it as a general-purpose programming language for projects in which machine independence is less important. Ease of programming and safety features help you quickly produce working code. Some common programming errors never occur because of features like garbage collection and type-safe references. Support for multithreading caters to modern network-based and graphical user interface-based applications that must attend to multiple tasks simultaneously, and the mechanisms of exception handling ease the task of dealing with error conditions. While the built-in tools are powerful, it is a simple language in which programmers can quickly become proficient. The Java programming language is designed for maximum portability with as few implementation dependencies as possible. An int, for example, is a 32-bit signed two's-complement integer in all implementations, irrespective of the CPU architecture on which the program executes. Defining everything possible about the language and its runtime environment enables users to run compiled code anywhere and share code with anyone who has a Java runtime environment. About This Book This book teaches the Java programming language to people who are familiar with basic programming concepts. It explains the language without being arduously formal or complete. This book is not an introduction to object-oriented programming, although some issues are covered to establish a common terminology. Other books in this series and much online documentation focus on applets, graphical interfaces, Web sites, databases, components, and other specific kinds of programming tasks. For other references, see "Further Reading" on page 755. This fourth edition provides integrated coverage of the Java programming language as provided by the Java 2 Platform Standard Edition 5.0 and specified by theJava Language Specification, Third Edition.It also covers most of the classes in the main packages (java.lang, java.util, java.io) as implemented in the J2SE Development Kit 5.0 (more commonly known as JDK 5.0, or in the older nomenclature JDK 1.5.0). If you have already read the third edition of this book, you will find some major changes, both in the language a

Rewards Program