ISBN-10:
0201703939
ISBN-13:
9780201703931
Pub. Date:
12/28/2000
Publisher:
Addison-Wesley
The Java Tutorial: A Short Course on the Basics / Edition 3

The Java Tutorial: A Short Course on the Basics / Edition 3

Paperback

Current price is , Original price is $54.99. You

Temporarily Out of Stock Online

Please check back later for updated availability.

This item is available online through Marketplace sellers.

Product Details

ISBN-13: 9780201703931
Publisher: Addison-Wesley
Publication date: 12/28/2000
Series: Addison-Wesley Java Series
Edition description: Older Edition
Pages: 592
Product dimensions: 7.36(w) x 9.26(h) x 1.39(d)

About the Author

Mary Campione was formerly a senior technical writer at Sun Microsystems, where she started writing about the Java platform in 1995. Mary graduated from California Polytechnic, San Luis Obispo, with a B.S. in Computer Science and has worked as both a technical writer and programmer. Kathy Walrath is a senior technical writer on the Swing team at Sun Microsystems. After graduating from the University of California, Berkeley, with a B.S. in Electrical Engineering and Computer Science, Kathy wrote extensively about Unix, Mach, and NextStep. Since 1993, Kathy has been writing specifications and how-to guides for the Java platform.

Alison Huml is a technical writer at Sun Microsystems, where she joined The Java Tutorial team in 1997 and also works with the Security team. Alison received her B.A. in English from the University of California, Berkeley, and is currently pursuing her master's degree in Computer Science at Mills College.

0201703939AB11062003

Table of Contents

Preface.

1. Getting Started.

About the Java Technology.

How Will Java Technology Change My Life?

First Steps (Win32).

A Checklist.

Creating Your First Application.

Creating Your First Applet.

Error Explanations (Win32).

First Steps (UNIX/Linux).

A Checklist.

Creating Your First Application.

Creating Your First Applet.

Error Explanations (UNIX/Linux).

First Steps (MacOS).

A Checklist.

Creating Your First Application.

Creating Your First Applet.

Error Explanation (MacOS).

A Closer Look at HelloWorld.

Explanation of an Application.

The Anatomy of an Applet.

Code Samples.

2. Object-Oriented Programming Concepts.

What Is an Object?

What Is a Message?

What Is a Class?

What Is Inheritance?

What Is an Interface?

How Do These Concepts Translate into Code?

Summary.

Code Samples.

3. Language Basics.

Variables.

Operators.

Expressions, Statements, and Blocks.

Control Flow Statements.

Code Samples.

4. Object Basics and Simple Data Objects.

The Life Cycle of an Object.

Characters and Strings.

Numbers.

Arrays.

Code Samples.

5. Classes and Inheritance.

Creating Classes.

Managing Inheritance.

Implementing Nested Classes.

Code Samples.

6. Interfaces and Packages.

Creating and Using Interfaces.

Creating and Using Packages.

Code Samples.

7. Handling Errors Using Exceptions.

What Is an Exception.

The Catch or Specify Requirement.

Catching and Handling Exceptions.

Specifying the Exceptions Thrown by a Method.

How to Throw Exceptions.

Runtime Exceptions - The Controversy.

Advantages of Exceptions.

Summary of Exceptions.

Questions and Exercises.

Code Samples.

8. Threads: Doing Two or More Tasks at Once.

What Is a Thread?

Using the Timer and TimerTask Classes.

Customizing a Thread's run Method.

The Life Cycle of a Thread.

Understanding Thread Priority.

Synchronizing Threads.

Grouping Threads.

Summary of Threads.

Questions and Exercises: Threads.

Code Samples.

9. I/O: Reading and Writing.

Overview of I/O Streams.

Using the Streams.

Object Serialization.

Working with Random Access Files.

And the Rest. . . .

Summary of Reading and Writing.

Questions and Exercises: Reading and Writing.

Code Samples.

10. User Interfaces that Swing.

Swing Overview.

Your First Swing Program.

Example Two: SwingApplication.

Example Three: CelsiusConverter.

Example Four: TravelWeather.

Example Five: Dialog Example.

Extras.

Look & Feel.

Layout Management.

Threads and Swing.

Supporting Assistive Technologies.

Visual Index to Swing Components.

Summary.

Questions and Exercises.

11. Applets for the Internet and Intranet.

Overview of Applets.

AWT Components.

Taking Advantage of the Applet API.

Practical Considerations of Writing Applets.

Finishing an Applet.

For More Information.

Questions and Exercises.

Appendix A. Common Problems and Their Solutions.

Getting Started Problems.

General Programming Problems.

Applet Problems.

User Interface Problems.

Appendix B. Collections.

Introduction.

Interfaces.

Implementations.

Algorithms.

Custom Implementations.

Interoperability.

Appendix C. Deprecated Thread Methods.

Why Is Thread.stop Deprecated?

Why Are Thread.suspend and Thread.resume Deprecated?

What about Thread.destroy?

Why Is Runtime.runFinalizersOnExit Deprecated?

Appendix D. Reference.

Java Programming Language Keywords.

Operator Precedence.

The APPLET Tag.

POSIX Conventions for Command-Line Arguments.

Integrated Development Environments.

Classpath Help.

Index. 0201703939T04062001

Preface

Since the release of the Java Development Kit in May of 1995, the engineering team at Sun Microsystems has been hard at work improving and enhancing the Java platform. We have been similarly laboring to update The Java Tutorial to reflect the work of the engineers.

From the first page to the last, this edition now documents the APIs in the Java 2 SDK, Standard Edition, v 1.3. We have fully integrated SDK 1.3 updates into the text, plus we've added questions and exercises to help you practice what you learn. To help beginners avoid many common mistakes, an entire chapter is devoted to programming problems and their solutions. Convenient summaries at the end of each section are also new to this edition.

Like the first and second editions, this book is based on the online tutorial hosted at Sun Microsystem's Web site for the Java platform.

http://java.sun.com/docs/books/tutorial/index.html

Like the online version, this book reflects the latest advances in Java technology. Unlike the online version, this book solely focuses on the APIs needed by most beginning to intermediate programmers. Once you've mastered the material in this book, you can explore the rest of the Java platform on the Web site.

Our intent has always been to create a fun, easy-to-read, task-oriented programmer's guide with lots of practical examples to help people learn to program.

Who Should Read This Book?

The book is geared towards both novice and experienced programmers.

  • New programmers can benefit most by reading the book from beginning to end, including the step by step instructions for compiling and running your first program in Getting Started (page 1).
  • Programmers experienced with procedural languages such as C may wish start with the material on object-oriented concepts and features of the Java programming language.
  • Experienced object programmers may want to jump feet first into more advanced trails, such as those on applets, essential classes, or user interfaces.

No matter what type of programmer you are, you can find a path through this book that fits your learning requirements.

How to Use This Book

This book is designed so that you can either read it straight through or skip around from topic to topic. Whenever a topic is discussed in another place, you'll see a link to that place in the tutorial. Links are underlined and are followed by page numbers, like this: What Can Java Technology Do? (page 5).

All the sample code used in this book is available online and on the accompanying CD. The CD icon in the margin indicates that the code is available. At the end of each chapter there is also a "Code Sample" section with a table that specifies the locations of the examples on the CD and online.

We're dedicated to keeping this book up-to-date with the most current information. To learn what's new since this book went to press, visit the following URL:

http://java.sun.com/docs/books/tutorial/books/3e/index.html

0201703939P04062001

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews