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.

9780201704334

The Java(TM) Programming Language

by ; ;
  • ISBN13:

    9780201704334

  • ISBN10:

    0201704331

  • Edition: 3rd
  • Format: Paperback
  • Copyright: 2000-01-01
  • Publisher: Prentice Hall PTR
  • View Upgraded Edition

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: $44.99 Save up to $11.25
  • Buy Used
    $33.74

    USUALLY SHIPS IN 2-4 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

Restructured to deliver in-depth coverage of Java's critical new features, this guide contains code examples to help developers make the most of new Java features. It offers a creator's eye view of the rationale behind Java's design, and its latest enhancements, all designed to help developers make the most of Java's power, portability, and flexibility.

Table of Contents

A Quick Tour
1(34)
Getting Started
1(2)
Variables
3(3)
Comments in Code
6(1)
Named Constants
6(2)
Unicode Characters
8(1)
Flow of Control
9(2)
Classes and Objects
11(3)
Creating Objects
12(1)
Static or Class Fields
13(1)
The Garbage Collector
14(1)
Methods and Parameters
14(3)
Invoking a Method
15(1)
The this Reference
16(1)
Static or Class Methods
17(1)
Arrays
17(3)
String Objects
20(2)
Extending a Class
22(3)
Invoking Methods from the Superclass
23(1)
The Object Class
24(1)
Type Casting
25(1)
Interfaces
25(2)
Exceptions
27(3)
Packages
30(2)
The Java Platform
32(1)
Other Topics Briefly Noted
33(2)
Classes and Objects
35(30)
A Simple Class
36(2)
Class Members
36(1)
Class Modifiers
37(1)
Fields
38(3)
Field Initialization
38(1)
Static Fields
39(1)
final Fields
40(1)
Access Control
41(1)
Creating Objects
42(1)
Construction and Initialization
43(7)
Constructors
44(4)
Initialization Blocks
48(1)
Static Initialization
49(1)
Methods
50(9)
Static Methods
51(1)
Method Invocations
51(2)
Method Execution and Return
53(1)
Parameter Values
54(3)
Using Methods to Control Access
57(2)
this
59(2)
Overloading Methods
61(1)
The main Method
62(1)
Native Methods
63(2)
Extending Classes
65(40)
An Extended Class
66(3)
Constructors in Extended Classes
69(4)
Constructor Order Dependencies
71(2)
Inheriting and Redefining Members
73(6)
Overriding
73(1)
Hiding Fields
74(1)
Accessing Inherited Members
75(2)
Accessibility and Overriding
77(1)
Hiding Static Members
77(1)
The super Keyword
78(1)
Type Compatibility and Conversion
79(2)
Compatibility
79(1)
Explicit Type Casting
80(1)
Testing for Type
80(1)
What protected Really Means
81(3)
Marking Methods and Classes final
84(1)
Abstract Classes and Methods
85(2)
The Object Class
87(2)
Cloning Objects
89(6)
Strategies for Cloning
89(2)
Correct Cloning
91(3)
Shallow versus Deep Cloning
94(1)
Extending Classes: How and When
95(1)
Designing a Class to Be Extended
96(6)
Designing an Extensible Framework
97(5)
Single Inheritance versus Multiple Inheritance
102(3)
Interfaces
105(16)
A Simple Interface Example
106(2)
Interface Declarations
108(2)
Interface Constants
109(1)
Interface Methods
109(1)
Interface Modifiers
110(1)
Extending Interfaces
110(3)
Inheriting and Hiding Constants
111(1)
Inheriting, Overriding, and Overloading Methods
112(1)
Working with Interfaces
113(4)
Implementing Interfaces
114(2)
Using an Implementation
116(1)
Marker Interfaces
117(1)
When to Use Interfaces
118(3)
Nested Classes and Interfaces
121(16)
Static Nested Types
121(2)
Static Nested Classes
122(1)
Nested Interfaces
123(1)
Inner Classes
123(6)
Accessing Enclosing Objects
125(1)
Extending Inner Classes
126(1)
Inheritance, Scoping, and Hiding
127(2)
Local Inner Classes
129(2)
Anonymous Inner Classes
131(1)
Inheriting Nested Types
132(2)
Nesting in Interfaces
134(2)
Modifiable Variables in Interfaces
135(1)
Implementation of Nested Types
136(1)
Tokens, Operators, and Expressions
137(42)
Lexical Elements
137(4)
Character Set
138(1)
Comments
138(1)
Tokens
139(1)
Identifiers
140(1)
Keywords
141(1)
Types and Literals
141(3)
Reference Literals
142(1)
Boolean Literals
142(1)
Character Literals
142(1)
Integer Literals
143(1)
Floating-Point Literals
143(1)
String Literals
144(1)
Class Literals
144(1)
Variables
144(4)
Field and Local Variable Declarations
145(1)
Parameter Variables
146(1)
final Variables
146(2)
Array Variables
148(4)
Array Modifiers
149(1)
Arrays of Arrays
149(1)
Array Initialization
150(1)
Arrays and Types
151(1)
The Meanings of Names
152(4)
Arithmetic Operations
156(3)
Integer Arithmetic
156(1)
Floating-Point Arithmetic
156(2)
Strict and non-Strict Floating-Point Arithmetic
158(1)
General Operators
159(9)
Increment and Decrement Operators
159(1)
Relational and Equality Operators
160(1)
Logical Operators
161(1)
instanceof
162(1)
Bit Manipulation Operators
163(1)
The Conditional Operator?:
164(1)
Assignment Operators
165(2)
String Concatenation Operator
167(1)
new
167(1)
Expressions
168(5)
Order of Evaluation
168(1)
Expression Type
169(1)
Implicit Type Conversions
169(2)
Explicit Type Casts
171(1)
String Conversions
172(1)
Member Access
173(3)
Finding the Right Method
173(3)
Operator Precedence and Associativity
176(3)
Control Flow
179(16)
Statements and Blocks
179(1)
if-else
180(2)
switch
182(3)
while and do-while
185(1)
for
186(3)
Labels
189(1)
break
189(3)
continue
192(1)
return
193(1)
What, No goto?
193(2)
Exceptions
195(14)
Creating Exception Types
196(1)
throw
197(2)
Transfer of Control
198(1)
Asynchronous Exceptions
198(1)
The throws Clause
199(3)
throws Clauses and Method Overriding
200(1)
throws Clauses and Native Methods
201(1)
try, catch, and finally
202(4)
finally
204(2)
When to Use Exceptions
206(3)
Strings
209(18)
Basic String Operations
209(2)
String Comparisons
211(4)
String Literal Equivalence
214(1)
Utility Methods
215(1)
Making Related Strings
215(2)
String Conversions
217(1)
Strings and char Arrays
218(2)
Strings and byte Arrays
220(2)
Character Encodings
221(1)
The StringBuffer Class
222(5)
Modifying the Buffer
223(2)
Getting Data Out
225(1)
Capacity Management
226(1)
Threads
227(44)
Creating Threads
229(2)
Using Runnable
231(4)
Synchronization
235(9)
synchronized Methods
235(3)
Static Synchronized Methods
238(1)
synchronized Statements
238(4)
Synchronization Designs
242(2)
wait, notifyAll, and notify
244(2)
Details of Waiting and Notification
246(2)
Thread Scheduling
248(4)
Voluntary Rescheduling
249(3)
Deadlocks
252(2)
Ending Thread Execution
254(5)
Cancelling a Thread
255(2)
Waiting for a Thread to Complete
257(2)
Ending Application Execution
259(1)
volatile
260(1)
Thread Management, Security and ThreadGroup
261(5)
Threads and Exceptions
266(1)
Don't stop
266(1)
ThreadLocal Variables
267(2)
Debugging Threads
269(2)
Programming with Types
271(42)
Wrapper Classes
272(10)
Void
274(1)
Boolean
274(1)
Character
275(4)
Number
279(1)
The Integer Wrappers
279(2)
The Floating-Point Wrapper Classes
281(1)
Reflection
282(22)
The Class class
283(4)
Naming Classes
287(1)
Examining Class Members
288(4)
The Modifier Class
292(1)
The Field Class
292(2)
The Method Class
294(2)
Creating New Objects and the Constructor Class
296(3)
Access Checking and AccessibleObject
299(1)
Arrays
299(2)
Packages
301(1)
The Proxy Class
301(3)
Loading Classes
304(9)
The ClassLoader Class
307(2)
Preparing a Class for use
309(1)
Loading Related Resources
310(3)
Garbage Collection and Memory
313(16)
Garbage Collection
313(1)
A Simple Model
314(2)
Finalization
316(2)
Resurrecting Objects during finalize
318(1)
Interacting with the Garbage Collector
318(2)
Reachability States and Reference Objects
320(9)
The Reference Class
321(1)
Strengths of Reference and Reachability
321(4)
Reference Queues
325(4)
Packages
329(12)
Package Naming
330(1)
Type Imports
331(1)
Package Access
332(4)
Accessibility and Overriding Methods
333(3)
Package Contents
336(1)
Package Objects and Specifications
337(4)
Documentation Comments
341(14)
The Anatomy of a Doc Comment
342(1)
Tags
343(4)
@see
343(1)
{@link}
344(1)
@param
345(1)
@return
345(1)
@throws and @exception
345(1)
@deprecated
345(1)
@author
346(1)
@version
346(1)
@since
346(1)
{@docRoot}
347(1)
An Example
347(5)
External Conventions
352(1)
Overview and Package Documentation
352(1)
The doc-files Directory
353(1)
Notes on Usage
353(2)
The I/O Package
355(66)
Byte Streams
357(5)
InputStream
357(3)
OutputStream
360(2)
Character Streams
362(5)
Reader
363(3)
Writer
366(1)
Character Streams and the Standard Streams
367(1)
InputStreamReader and OutputStreamWriter
367(2)
A Quick Tour of The Stream Classes
369(22)
Synchronization and Concurrency
370(1)
Filter Streams
371(3)
Buffered Streams
374(1)
Piped Streams
375(2)
ByteArray Byte Streams
377(1)
CharArray Character Streams
378(1)
String Character Streams
379(1)
Print Streams
380(1)
LineNumber Reader
381(2)
SequenceInputStream
383(1)
Pushback Streams
384(2)
StreamTokenizer
386(5)
The Data Byte Streams
391(4)
DataInput and DataOutput
392(1)
The Data Stream Classes
393(2)
Working with Files
395(10)
File Streams and FileDescriptor
395(1)
RandomAccessFile
396(2)
The File Class
398(6)
FilenameFilter and FileFilter
404(1)
Object Serialization
405(13)
The Object Byte Streams
405(1)
Making Your Classes Serializable
406(2)
Serialization and Deserialization Order
408(1)
Customized Serialization
409(4)
Object Versioning
413(1)
Serialized Fields
414(2)
The Externalizable Interface
416(1)
Documentation Comment Tags
417(1)
The IOException Classes
418(3)
Collections
421(42)
Collections
421(4)
Exception Conventions
424(1)
Iteration
425(2)
Ordering using Comparable and Comparator
427(1)
The Collection Interface
428(2)
Set and SortedSet
430(3)
HashSet
432(1)
TreeSet
432(1)
List
433(4)
ArrayList
435(1)
LinkedList
436(1)
Map and SortedMap
437(5)
HashMap
440(1)
TreeMap
441(1)
WeakHashMap
442(1)
Wrapped Collections and the Collections Class
442(6)
The Synchronization Wrappers
443(1)
The Unmodifiable Wrappers
444(1)
The Collections Utilities
445(3)
The Arrays Utility Class
448(1)
Writing Iterator Implementations
448(3)
Writing Collection Implementations
451(5)
The Legacy Collection Types
456(4)
Enumeration
457(1)
Vector
457(2)
Stack
459(1)
Dictionary
459(1)
Hashtable
460(1)
Properties
460(3)
Miscellaneous Utilities
463(16)
BitSet
464(2)
Observer/Observable
466(4)
Random
470(2)
StringTokenizer
472(1)
Timer and TimerTask
473(4)
Math and StrictMath
477(2)
System Programming
479(22)
The System Class
480(4)
Standard I/O Streams
480(1)
System Properties
481(2)
Utility Methods
483(1)
Creating Processes
484(4)
The Process Class
485(2)
Process Environments
487(1)
Portability
488(1)
Shutdown
488(4)
Shutdown Hooks
489(1)
The Shutdown Sequence
490(1)
Shutdown Strategies
491(1)
The Rest of the Runtime
492(1)
Loading Native Code
492(1)
Debugging
493(1)
Security
493(8)
The SecurityManager Class
494(2)
Permissions
496(1)
Security Policies
497(1)
Access Controllers and Privileged Execution
497(4)
Internationalization and Localization
501(26)
Locale
502(2)
Resource Bundles
504(5)
ListResourceBundle
507(1)
PropertyResourceBundle
508(1)
Subclassing ResourceBundle
509(1)
Time, Dates, and Calendars
509(8)
Calendars
510(4)
Time Zones
514(1)
GregorianCalendar and SimpleTimeZone
515(2)
Formatting and Parsing Dates and Times
517(3)
Internationalization and Localization for Text
520(7)
Collation
520(2)
Formatting and Parsing
522(2)
Text Boundaries
524(3)
Standard Packages
527(24)
java.awt---The Abstract Window Toolkit
529(3)
java.applet---Applets
532(1)
java.beans---Components
533(1)
java.math---Mathematics
534(1)
java.net---The Network
535(3)
java.rmi---Remote Method Invocation
538(5)
java.security---Security Tools
543(1)
java.sql---Relational Database Access
544(1)
Utility Subpackages
544(2)
Archive Files---java.util.jar
544(1)
ZIP Files---java.util.zip
545(1)
javax.*---Standard Extensions
546(1)
javax.accessibility---Accessibility for GUIs
546(1)
javax.naming---Directory and Naming Services
547(1)
javax.sound---Sound Manipulation
548(1)
javax.swing---Swing GUI Components
549(1)
org.omg.CORBA---CORBA APIs
549(2)
A Runtime Exceptions 551(6)
A.1 RuntimeException Classes
552(2)
A.2 Error Classes
554(3)
B Useful Tables 557(6)
Table 1: Keywords
557(1)
Table 2: Operator Precedence
558(1)
Table 3: Unicode Digits
558(1)
Table 4: Unicode Letters and Digits
559(1)
Table 5: Special Characters Using \
560(1)
Table 6: Documentation Comment Tags
560(1)
Table 7: Unicode Character Blocks
561(2)
Further Reading 563(6)
Index 569

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