Learning Java, 3/e (Paperback)
暫譯: 學習 Java, 第3版 (平裝本)

Patrick Niemeyer, Jonathan Knudsen

  • 出版商: O'Reilly
  • 出版日期: 2005-05-30
  • 售價: $1,740
  • 貴賓價: 9.5$1,653
  • 語言: 英文
  • 頁數: 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 標準版 SDK 的 5.0 版本是自 Java 十年前首次出現以來最重要的升級。使用 Java 5.0,您不僅會發現平台的重大變化,還有語言本身的變化——這是 Java 開發者花了五年時間完成的。Java 5.0 的主要目標是讓您更容易開發安全且強大的代碼,但這些改進並不會讓 Java 更容易學習,即使您已經編程多年。因此,我們的暢銷實作教程變得更加重要。
《學習 Java》是最受歡迎的 Java 程式語言入門書籍,這門程式語言改變了我們對計算的思考方式。我們更新的第三版對 Java 5.0 的新特性採取了客觀且不拖泥帶水的方式,其中一些特性與之前版本的做法截然不同。最重要的變化是加入了「泛型」(generics),這是一個允許開發者編寫、測試和部署代碼一次,然後可以針對不同數據類型重複使用的特性。泛型的美妙之處在於,更多的問題會在開發過程中被發現,而《學習 Java》將向您展示具體的實現方式。
Java 5.0 還為 Java 庫新增了超過 1,000 個新類別。這意味著您可以做 1,000 件新事物,而不必自己編寫代碼。這是一個巨大的變化。通過我們書中的實用範例,您將迅速掌握這些以及其他新特性,例如循環和執行緒。新版本還包括對 Eclipse 的介紹,這是一個日益受歡迎的開源 IDE。
《學習 Java》第三版涵蓋了 Java 的所有重要用途,例如網頁應用程式、servlets 和 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 VM
     運行 Java 應用程式
     類路徑
     Java 編譯器
     JAR 檔案
     政策檔案

**4. Java 語言**
     文本編碼
     註解
     類型
     語句和表達式
     例外
     斷言
     數組

**5. Java 中的物件**
     類別
     方法
     物件創建
     物件銷毀
     列舉

**6. 類別之間的關係**
     子類化和繼承
     介面
     包和編譯單元
     變數和方法的可見性
     數組和類別層次結構
     內部類別

**7. 操作物件和類別**
     物件類別
     類別類別
     反射
     註解

**8. 泛型**
     容器:建造更好的捕鼠器
     進入泛型
     「沒有湯匙」
     參數化類型關係
     類型轉換
     編寫泛型類別
     邊界
     通配符
     泛型方法
     參數化類型的數組
     案例研究:Enum 類
     案例研究:sort() 方法
     結論

**9. 執行緒**
     介紹執行緒
     為 Applet 加入執行緒
     同步
     排程和優先權
     執行緒組
     執行緒性能
     並發工具
     結論

**10. 操作文本**
     與文本相關的 API
     字串
     國際化
     解析和格式化文本
     Printf 風格格式化
     使用 java.text 包格式化
     正則表達式

**11. 核心工具**
     數學工具
     日期和時間
     計時器
     集合
     屬性
     Preferences API
     Logging API
     觀察者和可觀察者

**12. 輸入/輸出設施**
     流
     檔案
     序列化
     數據壓縮
     NIO 包

**13. 網路編程**
     套接字
     數據報套接字
     簡單序列化物件協議
     遠程方法調用
     使用 NIO 進行可擴展 I/O

**14. 網頁編程**
     統一資源定位器 (URLs)
     URL 類
     與網頁應用程式對話
     網路服務

**15. 網頁應用程式和網路服務**
     網頁應用程式技術
     網頁應用程式
     WAR 檔案和部署
     Servlet 過濾器
     使用 Ant 建立 WAR 檔案
     實作網路服務

**16. Swing**
     元件
     容器
     事件
     事件摘要
     AWT 機器人!
     Swing 中的多執行緒

**17. 使用 Swing 元件**
     按鈕和標籤
     複選框和單選按鈕
     列表和下拉框
     旋轉器
     邊框
     選單
     彈出選單
     JScrollPane 類
     JSplitPane 類
     JTabbedPane 類
     滾動條和滑塊
     對話框

**18. 更多 Swing 元件**
     文本元件
     焦點導航
     樹
     表格
     桌面
     可插拔外觀和感覺
     創建自定義元件

**19. 佈局管理器**
     FlowLayout
     GridLayout
     BorderLayout
     BoxLayout
     CardLayout
     GridBagLayout
     非標準佈局管理器
     絕對定位
     SpringLayout

**20. 使用 2D API 繪圖**
     全景
     渲染管道
     Java 2D 快速導覽
     填充形狀
     描邊形狀輪廓
     使用字型
     顯示圖像
     繪圖技術
     列印

**21. 操作圖像和其他媒體**
     加載圖像
     生成圖像數據
     過濾圖像數據
     保存圖像數據
     簡單音頻
     Java 媒體框架

**22. JavaBeans**
     什麼是 Bean?
     NetBeans IDE
     屬性和自定義器
     事件連接和適配器
     綁定屬性
     構建 Beans
     視覺設計的限制
     序列化與代碼生成
     使用 BeanInfo 進行自定義
     手動編碼 Beans
     BeanContext 和 BeanContextServices
     Java 激活框架
     企業 JavaBeans

**23. Applets**
     Applet 的政治
     JApplet 類
     使用 Java 插件
     Java Web Start
     使用數位簽名
     結論

**24. XML**
     一些背景
     XML 基礎
     S