Learning Java, 3/e (Paperback)

Patrick Niemeyer, Jonathan Knudsen

  • 出版商: O'Reilly
  • 出版日期: 2005-05-30
  • 售價: $1,670
  • 貴賓價: 9.5$1,587
  • 語言: 英文
  • 頁數: 980
  • 裝訂: Paperback
  • ISBN: 0596008732
  • ISBN-13: 9780596008734
  • 相關分類: Java 程式語言
  • 已過版

買這商品的人也買了...

商品描述

Description:

Version 5.0 of the Java 2 Standard Edition SDK is the most important upgrade since Java first appeared a decade ago. With Java 5.0, you'll not only find substantial changes in the platform, but to the language itself-something that developers of Java took five years to complete. The main goal of Java 5.0 is to make it easier for you to develop safe, powerful code, but none of these improvements makes Java any easier to learn, even if you've programmed with Java for years. And that means our bestselling hands-on tutorial takes on even greater significance.

Learning Java is the most widely sought introduction to the programming language that's changed the way we think about computing. Our updated third edition takes an objective, no-nonsense approach to the new features in Java 5.0, some of which are drastically different from the way things were done in any previous versions. The most essential change is the addition of "generics", a feature that allows developers to write, test, and deploy code once, and then reuse the code again and again for different data types. The beauty of generics is that more problems will be caught during development, and Learning Java will show you exactly how it's done.

Java 5.0 also adds more than 1,000 new classes to the Java library. That means 1,000 new things you can do without having to program it in yourself. That's a huge change. With our book's practical examples, you'll come up to speed quickly on this and other new features such as loops and threads. The new edition also includes an introduction to Eclipse, the open source IDE that is growing in popularity.

Learning Java, 3rd Edition addresses all of the important uses of Java, such as web applications, servlets, and XML that are increasingly driving enterprise applications. The accompanying CD includes the Java 5.0 SDK for Windows, Linux and Solaris, plus the Eclipse IDE, the NetBeans IDE, and the many example programs from the book.

 

Table of Contents:

Preface

1. A Modern Language

     Enter Java

     A Virtual Machine

     Java Compared with Other Languages

     Safety of Design

     Safety of Implementation

     Application and User-Level Security
     Java and the Web

     Java as a General Application Language

     A Java Road Map

2. A First Application

     Java Tools and Environment

     HelloJava

     HelloJava2: The Sequel

     HelloJava3: The Button Strikes!

     HelloJava4: Netscape's Revenge

     Troubleshooting

3. Tools of the Trade

     The Java VM

     Running Java Applications

     The Classpath

     The Java Compiler

     JAR Files 

     Policy Files

4. The Java Language

     Text Encoding

     Comments

     Types

     Statements and Expressions

     Exceptions

     Assertions

     Arrays

5. Objects in Java

     Classes

     Methods

     Object Creation

     Object Destruction

     Enumerations

6. Relationships Among Classes

     Subclassing and Inheritance

     Interfaces

     Packages and Compilation Units

     Visibility of Variables and Methods

     Arrays and the Class Hierarchy

     Inner Classes

7. Working with Objects and Classes

     The Object Class

     The Class Class

     Reflection

     Annotations

8. Generics

     Containers: Building a Better Mousetrap
     Enter Generics

     "There Is No Spoon"

     Parameterized Type Relationships

     Casts

     Writing Generic Classes

     Bounds

     Wildcards

     Generic Methods

     Arrays of Parameterized Types

     Case Study: The Enum Class

     Case Study: The sort(  ) Method

     Conclusion

9. Threads

     Introducing Threads

     Threading an Applet

     Synchronization

     Scheduling and Priority

     Thread Groups

     Thread Performance

     Concurrency Utilities

     Conclusion

10. Working with Text

     Text-Related APIs

     Strings

     Internationalization

     Parsing and Formatting Text

     Printf-Style Formatting

     Formatting with the java.text Package

     Regular Expressions

11. Core Utilities

     Math Utilities

     Dates and Times

     Timers

     Collections

     Properties

     The Preferences API

     The Logging API

     Observers and Observables

12. Input/Output Facilities

     Streams

     Files

     Serialization

     Data Compression

     The NIO Package

13. Network Programming

     Sockets

     Datagram Sockets

     Simple Serialized Object Protocols

     Remote Method Invocation

     Scalable I/O with NIO

14. Programming for the Web

     Uniform Resource Locators (URLs)

     The URL Class

     Talking to Web Applications

     Web Services

15. Web Applications and Web Services

     Web Application Technologies

     Web Applications

     WAR Files and Deployment

     Servlet Filters

     Building WAR Files with Ant

     Implementing Web Services

16. Swing

     Components

     Containers

     Events

     Event Summary

     The AWT Robot!

     Multithreading in Swing

17. Using Swing Components

     Buttons and Labels

     Checkboxes and Radio Buttons

     Lists and Combo Boxes

     The Spinner

     Borders

     Menus

     Pop-up Menus

     The JScrollPane Class

     The JSplitPane Class

     The JTabbedPane Class

     Scrollbars and Sliders

     Dialogs

18. More Swing Components

     Text Components

     Focus Navigation

     Trees

     Tables

     Desktops

     Pluggable Look-and-Feel

     Creating Custom Components

19. Layout Managers

     FlowLayout

     GridLayout

     BorderLayout

     BoxLayout

     CardLayout

     GridBagLayout

     Nonstandard Layout Managers

     Absolute Positioning

     SpringLayout

20. Drawing with the 2D API

     The Big Picture

     The Rendering Pipeline

     A Quick Tour of Java 2D

     Filling Shapes

     Stroking Shape Outlines

     Using Fonts

     Displaying Images

     Drawing Techniques

     Printing

21. Working with Images and Other Media

     Loading Images

     Producing Image Data

     Filtering Image Data

     Saving Image Data

     Simple Audio

     Java Media Framework

22. JavaBeans

     What's a Bean?

     The NetBeans IDE

     Properties and Customizers

     Event Hookups and Adapters

     Binding Properties

     Building Beans

     Limitations of Visual Design

     Serialization Versus Code Generation

     Customizing with BeanInfo

     Hand-Coding with Beans

     BeanContext and BeanContextServices

     The Java Activation Framework

     Enterprise JavaBeans

23. Applets

     The Politics of Applets

     The JApplet Class

     Using the Java Plug-in

     Java Web Start

     Using Digital Signatures

     Conclusion

24. XML

     A Bit of Background

     XML Basics

     SAX

     DOM

     XPath

     XInclude

     Validating Documents

     JAXB and Code Generation

     Transforming Documents with XSL/XSLT

     Web Services

     The End of the Book

A. The Eclipse IDE

B. BeanShell: Simple Java Scripting

Glossary

Index

商品描述(中文翻譯)

描述:
Java 2 Standard Edition SDK 5.0 版本是自十年前 Java 首次出現以來最重要的升級。Java 5.0 不僅在平台上有重大變化,還對語言本身進行了大幅改變,這是 Java 開發人員花了五年時間完成的工作。Java 5.0 的主要目標是讓您更容易開發安全、強大的代碼,但這些改進並不意味著 Java 的學習變得更容易,即使您已經使用 Java 程式語言多年。這意味著我們最暢銷的實踐教程變得更加重要。

《學習 Java》是對改變我們對計算方式思考的程式語言最廣泛尋求的介紹。我們更新的第三版對 Java 5.0 的新功能採取客觀、直截了當的方法,其中一些功能與以前的版本完全不同。最重要的變化是添加了「泛型」,這是一個允許開發人員為不同的數據類型編寫、測試和部署代碼的功能。泛型的優點是在開發過程中可以更早地發現問題,《學習 Java》將向您展示如何實現這一點。Java 5.0 還向 Java 库添加了超過 1,000 個新類。這意味著您可以在不必自己編寫程式的情況下完成 1,000 多種任務。這是一個巨大的變化。通過我們書中的實例,您將迅速掌握這些新功能,如循環和線程。新版還介紹了越來越受歡迎的開源 IDE Eclipse。《學習 Java》第三版涵蓋了 Java 的所有重要用途,如 Web 應用程序、servlet 和 XML,這些用途越來越多地推動企業應用程序的發展。附帶的 CD 包括 Windows、Linux 和 Solaris 的 Java 5.0 SDK,以及 Eclipse IDE、NetBeans IDE 和書中的許多示例程式。

目錄:
前言
1. 現代語言
- 進入 Java
- 虛擬機
- Java 與其他語言的比較
- 設計的安全性
- 實現的安全性
- 應用和用戶級安全性
- Java 和網絡
- Java 作為通用應用程式語言
- Java 路線圖
2. 第一個應用程式
- Java 工具和環境
- HelloJava
- HelloJava2: 續集
- HelloJava3: 按鈕出擊!
- HelloJava4: Netscape 的報復
- 故障排除
3. 工具
- Java 虛擬機
- 運行 Java 應用程式
- 類路徑
- Java 編譯器
- JAR 檔案
- 策略檔案
4. Java 語言
- 文本編碼
- 註釋
- 類型
- 陳述和表達式