1. Trang chủ
  2. » Công Nghệ Thông Tin

OReilly learning java 3rd edition may 2005 ISBN 0596008732

1,8K 83 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 1.816
Dung lượng 8,29 MB

Nội dung

Learning Java, 3rd Edition By Jonathan Knudsen, Patrick Niemeyer Publisher: O'Reilly Pub Date: May 2005 ISBN: 0-596-00873-2 Pages: 976 Table of Contents | Index 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 Learning Java, 3rd Edition By Jonathan Knudsen, Patrick Niemeyer Publisher: O'Reilly Pub Date: May 2005 ISBN: 0-596-00873-2 Pages: 976 Table of Contents | Index Copyright Preface New Developments Using This Book Online Resources Conventions Used in This Book Using Code Examples Safari Enabled How to Contact Us Acknowledgments Chapter 1 A Modern Language Section 1.1 Enter Java Section 1.2 A Virtual Machine Section 1.3 Java Compared with Other Languages Section 1.4 Safety of Design Section 1.5 Safety of Implementation Section 1.6 Application and User-Level Security Section 1.7 Java and the Web Section 1.8 Java as a General Application Language Section 1.9 A Java Road Map Chapter 2 A First Application Section 2.1 Java Tools and Environment Section 2.2 HelloJava Section 2.3 HelloJava2: The Sequel Section 2.4 HelloJava3: The Button Strikes! Section 2.5 HelloJava4: Netscape's Revenge Section 2.6 Troubleshooting Chapter 3 Tools of the Trade Section 3.1 The Java VM Section 3.2 Running Java Applications Section 3.3 The Classpath Section 3.4 The Java Compiler Section 3.5 JAR Files Section 3.6 Policy Files Chapter 4 The Java Language Section 4.1 Text Encoding Section 4.2 Comments Section 4.3 Types Section 4.4 Statements and Expressions Section 4.5 Exceptions Section 4.6 Assertions Section 4.7 Arrays Chapter 5 Objects in Java Section 5.1 Classes Section 5.2 Methods Section 5.3 Object Creation Section 5.4 Object Destruction Section 5.5 Enumerations Chapter 6 Relationships Among Classes Section 6.1 Subclassing and Inheritance Section 6.2 Interfaces Section 6.3 Packages and Compilation Units Section 6.4 Visibility of Variables and Methods Section 6.5 Arrays and the Class Hierarchy Section 6.6 Inner Classes Chapter 7 Working with Objects and Classes Section 7.1 The Object Class Section 7.2 The Class Class Section 7.3 Reflection Section 7.4 Annotations Chapter 8 Generics Section 8.1 Containers: Building a Better Mousetrap Section 8.2 Enter Generics Section 8.3 "There Is No Spoon" Section 8.4 Parameterized Type Relationships Section 8.5 Casts Section 8.6 Writing Generic Classes Section 8.7 Bounds Section 8.8 Wildcards Section 8.9 Generic Methods Section 8.10 Arrays of Parameterized Types Section 8.11 Case Study: The Enum Class Section 8.12 Case Study: The sort( ) Method Section 8.13 Conclusion Chapter 9 Threads Section 9.1 Introducing Threads Section 9.2 Threading an Applet Section 9.3 Synchronization Section 9.4 Scheduling and Priority Section 9.5 Thread Groups Section 9.6 Thread Performance Section 9.7 Concurrency Utilities Section 9.8 Conclusion Chapter 10 Working with Text Section 10.1 Text-Related APIs Section 10.2 Strings Section 10.3 Internationalization Section 10.4 Parsing and Formatting Text Section 10.5 Printf-Style Formatting Section 10.6 Formatting with the java.text Package Section 10.7 Regular Expressions Chapter 11 Core Utilities Section 11.1 Math Utilities Section 11.2 Dates and Times Section 11.3 Timers Section 11.4 Collections Section 11.5 Properties Section 11.6 The Preferences API Section 11.7 The Logging API Section 11.8 Observers and Observables Chapter 12 Input/Output Facilities Section 12.1 Streams Section 12.2 Files Section 12.3 Serialization Section 12.4 Data Compression Section 12.5 The NIO Package Chapter 13 Network Programming Section 13.1 Sockets Section 13.2 Datagram Sockets Section 13.3 Simple Serialized Object Protocols Section 13.4 Remote Method Invocation Section 13.5 Scalable I/O with NIO Chapter 14 Programming for the Web Section 14.1 Uniform Resource Locators (URLs) Section 14.2 The URL Class Section 14.3 Talking to Web Applications Section 14.4 Web Services Chapter 15 Web Applications and Web Services Section 15.1 Web Application Technologies Section 15.2 Web Applications Section 15.3 WAR Files and Deployment Section 15.4 Servlet Filters Section 15.5 Building WAR Files with Ant Section 15.6 Implementing Web Services Chapter 16 Swing Section 16.1 Components Section 16.2 Events Section 16.3 Event Summary Section 16.4 The AWT Robot! Section 16.5 Multithreading in Swing Chapter 17 Using Swing Components Section 17.1 Buttons and Labels Section 17.2 HTML Text in Buttons and Labels Section 17.3 Checkboxes and Radio Buttons Section 17.4 Lists and Combo Boxes Section 17.5 The Spinner Section 17.6 Borders Section 17.7 Menus Section 17.8 Pop-up Menus Section 17.9 Component-Managed Pop-ups Section 17.10 The JScrollPane Class Section 17.11 The JSplitPane Class Section 17.12 The JTabbedPane Class Section 17.13 Scrollbars and Sliders Section 17.14 Dialogs Section 17.15 File Selection Dialog Section 17.16 The Color Chooser Chapter 18 More Swing Components Section 18.1 Text Components Section 18.2 Focus Navigation Section 18.3 Tables Section 18.4 Desktops Section 18.5 Pluggable Look-and-Feel Section 18.6 Creating Custom Components Chapter 19 Layout Managers Section 19.1 FlowLayout Section 19.2 GridLayout Section 19.3 BorderLayout Section 19.4 BoxLayout Section 19.5 CardLayout Section 19.6 GridBagLayout Section 19.7 Nonstandard Layout Managers Section 19.8 Absolute Positioning Section 19.9 SpringLayout Chapter 20 Drawing with the 2D API Section 20.1 The Big Picture Section 20.2 The Rendering Pipeline Section 20.3 A Quick Tour of Java 2D Section 20.4 Filling Shapes Section 20.5 Stroking Shape Outlines Section 20.6 Using Fonts Section 20.7 Displaying Images Section 20.8 Drawing Techniques Section 20.9 Printing Chapter 21 Working with Images and Other Media Section 21.1 Loading Images Section 21.2 Producing Image Data Section 21.3 Filtering Image Data Section 21.4 Saving Image Data Section 21.5 Simple Audio Section 21.6 Java Media Framework Chapter 22 JavaBeans Section 22.1 What's a Bean? Section 22.2 The NetBeans IDE Section 22.3 Properties and Customizers Section 22.4 Event Hookups and Adapters Section 22.5 Binding Properties Section 22.6 Building Beans Section 22.7 Limitations of Visual Design Section 22.8 Serialization Versus Code Generation Section 22.9 Customizing with BeanInfo Section 22.10 Hand-Coding with Beans Section 22.11 BeanContext and BeanContextServices Section 22.12 The Java Activation Framework Section 22.13 Enterprise JavaBeans Chapter 23 Applets Section 23.1 The Politics of Applets Section 23.2 The JApplet Class Section 23.3 Using the Java Plug-in Section 23.4 Java Web Start Section 23.5 Using Digital Signatures Section 23.6 Conclusion Chapter 24 XML Section 24.1 A Bit of Background Section 24.2 XML Basics Section 24.3 SAX Section 24.4 DOM Section 24.5 XPath Section 24.6 XInclude Section 24.7 Validating Documents Section 24.8 JAXB and Code Generation Section 24.9 Transforming Documents with XSL/XSLT Section 24.10 Web Services Section 24.11 The End of the Book Appendix A The Eclipse IDE Section A.1 The IDE Wars Section A.2 Getting Started with Eclipse Section A.3 Using Eclipse Section A.4 Eclipse Features Section A.5 Conclusion Appendix B BeanShell: Simple Java Scripting Section B.1 Running BeanShell Section B.2 Java Statements and Expressions Section B.3 BeanShell Commands Section B.4 Scripted Methods and Objects Section B.5 Changing the Classpath Section B.6 Learning More Glossary Colophon About the Authors Colophon Index Learning Java?, Third Edition by Patrick Niemeyer and Jonathan Knudsen Copyright © 2005, 2002, 2000 O'Reilly Media, Inc All rights reserved Printed in the United States of America Published by O'Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O'Reilly books may be purchased for educational, business, or sales promotional use Online editions are also available for most titles (safari.oreilly.com) For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com Editor: Mike Loukides and Debra Cameron Production Editor: Matt Hutchinson Production Services: MendeDesign, Octal Publishing, Inc Cover Designer: Hanna Dyer Interior Director: David Futato Printing History: May 2000: First Edition June 2002: Second Edition May 2005: Third Edition Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly Media, Inc Learning Java, the image of a Bengal tigress and cubs, and related trade dress are trademarks of O'Reilly Media, Inc Java? and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc., in the United States and other countries O'Reilly Media, Inc., is independent of Sun Microsystems Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and O'Reilly Media, Inc was aware of a trademark claim, the designations have been printed in caps or initial caps While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein ISBN: 0-596-00873-2 [M] Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] UDP (User Datagram Protocol) 2nd UIManager class unbounded wildcards unboxing primitive types unchecked exceptions 2nd UnicastRemoteObject class Unicode Charset class encapsulation in String objects Unix CLASSPATH environment variable grep command GUI desktop UnknownHostException class UnknownServiceException unmarshaling XML documents unnamed packages unpacking JAR files unreachable objects unreachable statements UnsupportedOperationException 2nd untrusted applets browser restrictions on sharing class loaders update( ) method 2nd updateComponentTreeUI( ) method updating BufferedImage class coordinates fields GUIs images uppercase character strings URIs (Uniform Resource Identifiers) 2nd URLEncoder class URLs (Uniform Resource Locators) class files converting file paths to cookie deployment, specifying for describing codebases document base and codebase encoding data in extra paths GET method image files, constructing for movies or audio files pattern mappings rewriting URL class web application servlets and files XSL stylesheets URNs (Uniform Resource Names) 2nd userNodeForPackage( ) method userRoot( ) method users authentication certificates (signer) signer certificates role assignment space coordinates UTF-8 encoding utilities collections dates and time logging API math Observer interface Preferences API properties timers WSDP utility classes Collections class Enumerator interface Hashtable class internationalization SortedSet interface timers Vector class Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] validating input to methods root containers text in JFormattedTextField component XML value-of tag (XSL) valueOf( ) method 2nd values data objects default property enum false hash codes Main-class, adding to manifests return RGB scalar strings, converting zero values( ) method variable-length argument lists variables 2nd access 2nd assigning value to class 2nd 3rd converting to/from strings declaring 2nd inheritance 2nd initializing 2nd instance 2nd 3rd 4th assigning value to constructor chaining and default values interfaces local 2nd public modifiers reference types shadowing 2nd static class members this reference transient types 2nd weightx weighty vectors verbose (-v) option (jar utility) verbose mode, jar utility verifier( ) method verifiers, bytecode verify( ) method VERITCAL constant versions, troubleshooting vertical scrollbars, display policy vetoableChange( ) method video files viewers for applets appletviewer program creating viewing applets appletviewer program images Plug-in applets views (components) virtual machines 2nd virtual memory virtual methods (C++) visibility applets basic access modifiers classes 2nd inheritance and invisible components in BoxLayout of methods and variables security shortcomings in API subclasses and visibility modifiers access to class members, controlling constructors private 2nd protected public, classes in source code files static inner classes visual development environments void return type 2nd Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] W3C schema simple types wait conditions wait( ) method 2nd waitForAll( ) method waitforID( ) method WaitServlet wakeup( ) method waking up threads blocked in I/O operations WAR files 2nd Ant deployment weak references 2nd weakCompareAndSet( ) method WeakHashMap class web applications communicating with filters frameworks HttpURLConnection Java Servlets API JSPs reloading security servlets technologies URLs, URNs, and URIs WAR files XML web browsers POST method web pages, dynamic content web services applying data types deploying implementing XML Web Services Description Language (WSDL) Web Services Developer Pack Web Start (Java) Web Start API WEB-INF directory web.xml files 2nd 3rd webapps directory WebNFS Java extension weighting (GridBagLayout) 2nd 3rd weightx variable weighty variable welcome files well-formed documents (XML) whitespace HTML tags StringTokenizer class, use of trimming from strings width of images of text wildcards arrays bounded capture containers generics instantiation methods, comparing to generic raw types relationships windows JFrame objects, creating with 2nd JWindow local system, colors for revalidating subclasses within windows, creating Windows operating systems Wong, Henry Wood, Dave word processors, building with JTextPane words characters parsing strings of text into positioning workCompleted( ) method WorkRequest class 2nd workspace (NetBeans) wrap( ) method wrapper classes HttpServletResponseWrapper class primitive types 2nd streams 2nd strings write( ) method BufferedOutputStream class LargerHttpd class OutputStream class PipedOutputStream class write-only properties writeInt( ) method writeObject( ) method 2nd Writer class writing generics locks wscompile command WSDL (Web Services Description Language) WYSIWYG GUI builder environment 2nd Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] XInclude XML (Extensible Markup Language) applications backing store files browsers 2nd complex types document headers and root elements DOM downloadable handlers and encoding history of Java object models JAXB namespaces parsers SAX 2nd state of syntax tags text versus binary validating web services web.xml files XML Schema, using XPath XSL 2nd XSL/XSLT XML-RPC XMLDecoder class XMLEncoder class XMLGrep xmlns attribute XMLReader class XPath XSL (Extensible Stylesheet Language) Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] years, setting yield( ) method Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] Z-ordering zero administration client installation zero values ZIP compression format 2nd ZipInputStream class ZipOutputStream class zones (time), TimeZone class .. .Learning Java, 3rd Edition By Jonathan Knudsen, Patrick Niemeyer Publisher: O'Reilly Pub Date: May 2005 ISBN: 0-596-00873-2 Pages: 976 Table of Contents... Hanna Dyer Interior Director: David Futato Printing History: May 2000: First Edition June 2002: Second Edition May 2005: Third Edition Nutshell Handbook, the Nutshell Handbook logo, and the... learn more on your own New Developments This edition of Learning Java is actually the fifth editionupdated and retitledof our original, popular Exploring Java With each edition we've taken great care not only to add new material

Ngày đăng: 26/03/2019, 16:12