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.

9780130819338

Core Java 2 : Fundamentals

by ;
  • ISBN13:

    9780130819338

  • ISBN10:

    0130819336

  • Edition: CD
  • Format: Paperback
  • Copyright: 1999-01-01
  • Publisher: Prentice Hall Professional Technical Reference
  • View Upgraded Edition
  • 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: $53.75

Summary

Ask any experienced Java developer: Core Java books deliver the real-world guidance and industrial-strength code you need to build sophisticated Java projects. That's why they've been huge best-sellers for three straight years! Now, there's a brand-new edition, reflecting Sun's powerful JDK 1.2 enhancements. Better than ever, Core Java 1.2, Volume 1: Fundamentals contains extensive new coverage of graphics programming, Swing lightweight user interface components, and more. There's also extensive new coverage of the Java 1.2 event model and debugging plus superb help with Java Streams-based network programming.

Table of Contents

Preface xx(4)
To the Reader xx(2)
About This Book xxii(2)
Conventions xxiv(1)
CD-ROM xxv
Acknowledgments xxiv
Chapter 1 An Introduction to Java
1(20)
Java as a Programming Tool
2(1)
Advantages of Java
3(1)
The Java "White Paper" Buzzwords
4(7)
Simple
5(1)
Object Oriented
6(1)
Distributed
6(1)
Robust
7(1)
Secure
7(2)
Architecture Neutral
9(1)
Portable
9(1)
Interpreted
10(1)
High Performance
10(1)
Multithreaded
11(1)
Dynamic
11(1)
Java and the Internet
11(3)
Applets at Work
12(2)
A Short History of Java
14(2)
Common Misconceptions about Java
16(5)
Chapter 2 The Java Programming Environment
21(22)
Installing the Java Compiler and Tools
21(3)
Development Environments for Windows Users
22(1)
Adding Core Java Files to an Integrated Development Environment
23(1)
Navigating the Java Directories
24(1)
Windows 95/98/NT as a Programming Environment
25(6)
Long File Names
25(2)
Multiple Windows
27(1)
Keyboard Shortcuts
28(1)
More on DOS Shells
29(1)
The EDIT Program
30(1)
Compiling and Running Java Programs
31(1)
Using TextPad
32(2)
Compiling and Running Programs
32(1)
Locating Compilation Errors
32(2)
Graphical Applications
34(2)
Applets
36(7)
Chapter 3 Fundamental Programming Structures in Java
43(62)
A Simple Java Program
44(3)
Comments
47(1)
Data Types
48(4)
Integers
48(2)
Floating-Point
50(1)
The Character Type (char)
50(2)
The Boolean Type
52(1)
Variables
52(1)
Assignments and Initializations
53(3)
Conversions Between Numeric Types
54(1)
Constants
55(1)
Operators
56(3)
Exponentiation
56(1)
Increment and Decrement Operators
56(1)
Relational and Boolean Operators
57(1)
Bitwise Operators
58(1)
Parentheses and Operator Hierarchy
59(1)
Strings
59(15)
Concatenation
60(1)
Substrings
60(1)
String Editing
61(1)
Testing Strings for Equality
62(3)
Reading Input
65(2)
Formatting Output
67(6)
A Mortgage Calendar
73(1)
Control Flow
74(12)
Block Scope
74(1)
Conditional Statements
75(3)
Indeterminate Loops
78(3)
Determinate Loops
81(2)
Multiple Selections-The switch Statement
83(1)
Labeled Breaks
84(2)
Class Methods (User-Defined Functions)
86(6)
Class Variables
90(1)
Recursion
90(2)
Arrays
92(13)
Copying Arrays
93(2)
Arrays as Arguments
95(1)
Arrays as Return Values
96(2)
Multidimensional Arrays
98(7)
Chapter 4 Objects and Classes
105(58)
Introduction to Object-Oriented Programming
106(8)
The Vocabulary of OOP
108(1)
Objects
109(1)
Relationships between Classes
110(2)
Contrasting OOP with Traditional Procedural Programming Techniques
112(2)
Using Existing Classes
114(14)
Object Variables
114(3)
The GregorianCalendar Class of the Java Library
117(4)
Mutator and Accessor Methods
121(1)
Using our Day Class
122(4)
Objects as Functional Arguments
126(2)
Starting to Build Your Own Classes
128(25)
An Employee Class
129(2)
Analyzing the Employee Class
131(1)
First Steps with Constructors
132(2)
The Methods of the Employee Class
134(4)
Method Access to Private Data
138(1)
Private Methods
138(1)
More on Object Construction
139(5)
Static Methods and Fields
144(5)
A CardDeck Class
149(4)
Packages
153(6)
Using Packages
154(5)
Class Design Hints
159(4)
Chapter 5 Inheritance
163(62)
First Steps with Inheritance
164(9)
Inheritance Hierarchies
169(1)
Working with Subclasses
170(1)
Objects Know How to Do Their Work: Polymorphism
170(2)
Preventing Inheritance: Final Classes and Methods
172(1)
Casting
173(3)
Abstract Classes
176(6)
Protecting Access
182(1)
Object: The Cosmic Superclass
182(22)
Vectors
186(9)
Object Wrappers
195(5)
Big Numbers
200(1)
Reading a Page in the HTML Documents
201(3)
The Class Class (Run-Time Type Identification)
204(2)
Reflection
206(16)
Design Hints for Inheritance
222(3)
Chapter 6 Interfaces and Inner Classes
225(34)
Interfaces
226(12)
Using an Abstract Superclass
226(3)
Using an Interface
229(3)
Properties of Interfaces
232(1)
The Cloneable Interface
233(3)
Interfaces and Callbacks
236(2)
Inner Classes
238(21)
A Property Interface
240(11)
Local Classes That Access Local Variables
251(4)
Static Inner Classes
255(4)
Chapter 7 Graphics Programming
259(56)
Introduction
260(4)
Creating a Closeable Frame
264(3)
Terminating Graphics Programs
267(3)
Frame Layout
270(6)
Displaying Information in a Frame
276(2)
Graphics Objects and the paintComponent method
278(3)
Text and Fonts
281(11)
Colors
292(2)
Drawing Shapes from Lines
294(4)
Drawing Rectangles and Ovals
298(2)
Filling Shapes
300(5)
Paint Mode
305(2)
Images
307(8)
Chapter 8 Event Handling
315(58)
Basics of Event Handling
316(14)
Example: Which Button Was Clicked?
318(9)
Example: Capturing Window Events
327(1)
Adapter Classes
328(2)
The AWT Event Hierarchy
330(2)
Semantic and Low-Level Events in the AWT
332(1)
Event Handling Summary
333(3)
Individual Events
336(16)
Focus Events
336(2)
Window Events
338(1)
Keyboard Events
338(6)
Mouse Events
344(8)
Separating GUI and Application Code
352(8)
Multicasting
360(2)
Advanced Event Handling
362(11)
Consumer Events
363(1)
The Event Queue
363(4)
Adding Custom Events
367(6)
Chapter 9 User Interface Components With Swing
373(158)
The Model-View-Controller Design Pattern
374(6)
A Model-View-Controller Analysis of Swing Buttons
379(1)
An Introduction to Layout Management
380(7)
Border Layout
383(1)
Panels
384(3)
Text Input
387(21)
Text Fields
387(6)
Input Validation
393(6)
Password Fields
399(5)
Labels and Labeling Components
404(2)
Selecting Text
406(1)
Editing Text
406(2)
Making Choices
408(33)
Check Boxes
408(3)
Radio Buttons
411(4)
Borders
415(5)
Lists
420(18)
Combo Boxes
438(3)
Scroll Bars
441(21)
Scroll Panes
446(10)
Scrolling a Window
456(6)
Sophisticated Layout Management
462(25)
Grid Layout
465(3)
Box Layout
468(6)
Grid Bag Layout
474(2)
The gridx, gridy, gridwidth, and gridheight Parameters
476(1)
Weight Fields
476(1)
The fill and anchor Parameters
476(1)
Padding
477(1)
An Alternative Method to Specify the gridx, gridy, gridwidth, and gridheight Parameters
477(3)
Using No Layout Manager
480(1)
Custom Layout Managers
481(4)
Traversal Order
485(2)
Menus
487(18)
Building Menus
488(3)
Reacting to Menu Events
491(1)
Icons in Menu Items
492(2)
Check Box and Radio Button Menu Items
494(1)
Pop-up Menus
495(2)
Keyboard Mnemonics and Accelerators
497(2)
Enabling and Disabling Menu Items
499(6)
Dialog Boxes
505(26)
Option Dialogs
505(11)
Creating Dialogs
516(4)
Data Exchange
520(4)
File Dialogs
524(7)
Chapter 10 Applets
531(52)
Applet Basics
532(3)
A Simple Applet
535(3)
Testing Applets
538(3)
Security Basics
541(2)
Converting Applications to Applets
543(3)
Life Cycle of an Applet
546(1)
The Applet HTML Tags and Attributes
547(13)
Applet Attributes for Positioning
549(1)
Applet Attributes for Code
550(2)
Applet Attributes for Java-Challenged Viewers
552(1)
The Object Tag
553(1)
Java Plug-In Tags
553(2)
Passing Information to Applets
555(5)
Pop-up Windows in Applets
560(2)
Multimedia
562(2)
URLs
562(1)
Obtaining Multimedia Files
563(1)
The Applet Context
564(12)
Inter-Applet Communication
565(1)
Displaying Items in the Browser
565(2)
A Bookmark Applet
567(4)
JAR Files
571(1)
Resources
572(4)
It's an Applet. It's an Application. It's Both!
576(7)
Chapter 11 Exceptions and Debugging
583(40)
Dealing With Errors
584(8)
The Classification of Exceptions
585(2)
Advertising the Exceptions That a Method Throws
587(3)
How to Throw and Exception
590(1)
Creating Exception Classes
591(1)
Catching Exceptions
592(8)
Catching Multiple Exceptions
594(2)
The finally Clause
596(1)
A Final Look at Java Error-and Exception-Handling
597(3)
Some Tips on Using Exceptions
600(3)
Debugging Techniques
603(13)
Useful Tricks for Debugging
603(3)
Assertions
606(3)
Trapping AWT Events
609(4)
Displaying Debug Messages in Graphics Programs
613(3)
Using the JDB Debugger
616(7)
Chapter 12 Streams and Files
623(74)
Streams
623(4)
Reading and Writing Bytes
624(3)
The Complete Stream Zoo
627(18)
Layering Stream Files
629(4)
Data Streams
633(4)
Random-Access File Streams
637(8)
ZIP File Streams
645(7)
Putting Streams to Use
652(12)
Writing Delimited Output
653(1)
String Tokenizers and Delimited Text
653(2)
Reading Delimited Input
655(9)
Random-Access Streams
Object Streams
664(25)
Storing Objects of Variable Type
665(4)
Object Serialization File Format
669(4)
The Problem of Saving Object References
673(5)
Output Format for Object References
678(3)
Security
681(4)
Versioning
685(4)
File Management
689(8)
Appendix I
697(2)
Java Keywords
697(2)
Appendix II
699(6)
The javadoc Utility
699(6)
How to Insert Comments
699(1)
General Comments
700(1)
Class and Interface Comments
701(1)
Method Comments
702(1)
Serialization Comments
702(1)
Package and Overview Comments
703(1)
How to Extract Comments
703(2)
Appendix III
705(8)
Installing the CD-ROM
705(8)
Contents of the CD-ROM
705(1)
Installation Directions
705(1)
Install the JDK
705(1)
Install Trial Software
706(1)
Install the Core Java Example Files
707(2)
Testing the Installation
709(1)
Testing the JDK
709(1)
Testing the Core Java Utility Package
709(1)
Testing Swing Set Support
709(1)
Troubleshooting
710(1)
PATH and CLASSPATH
710(1)
Memory Problems
710(1)
Case Sensitivity
710(1)
Browsers
710(1)
About Other Platforms
711(1)
Updates and Bug Fixes
711(2)
Index 713

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.

Rewards Program