Exploring Java (Paperback)

Patrick Niemeyer, Josh Peck

  • 出版商: O'Reilly
  • 出版日期: 1996-05-11
  • 定價: $875
  • 售價: 3.4$299
  • 語言: 英文
  • 頁數: 426
  • 裝訂: Paperback
  • ISBN: 1565921844
  • ISBN-13: 9781565921849
  • 相關分類: Java 程式語言





Exploring Java introduces the basics of Java, the hot new object-oriented programming language for networked applications from Sun Microsystems. Exploring Java enables programmers to quickly get up to speed writing Java applets, programs executed within web browsers.

Even before the first release of Java, companies from Oracle to Netscape and Microsoft licensed Java to integrate with their Internet products. What makes this new language so important? It's truly portable. The same code runs on any machine that provides a Java interpreter, whether Windows 95, Windows NT, the Macintosh, or any flavor of UNIX. And, potentially, Java is designed to be as fast as programs written in C and C++.

The ability to create animated World Wide Web pages has also sparked the rush to Java. But, the story does not end with the Web. Sophisticated large applications, such as spreadsheets or word processors, can also be written with Java. An early example is Sun's self-extensible web browser, HotJava.

With a practical, hands-on approach characteristic of O'Reilly's Nutshell Handbooks(R), Exploring Java shows you how to write dynamic web pages. But that's only the beginning. This book also shows you how to write content and protocol handlers, networking programs, and other standalone applications.

Exploring Java is the first book in a new Java documentation series from O'Reilly that will keep pace with the rapid Java developments. In this book, you will learn about:

  • History and principles of Java
  • How to write simple applets
  • How to integrate applets into the World Wide Web
  • Java Class Libraries
  • Using threads
  • Using arrays
  • Network programming
  • Content and protocol handling
  • Using the Abstract Windowing Toolkit (AWT)
  • Writing a security manager


Table of Contents:

Chapter Preface xi
Chapter 1 Yet
     Another Language? 1
     Enter Java 2
     A Virtual Machine 4
     Java Compared 6
     Safety of Design 8
     Safety of Implementation 14
     Application and User Level Security 19
     Java and the World Wide Web 21
     Java as a General Application Language 25
     Availability 25
Chapter 2
     A First Applet 27
     Hello Web! 27
     HelloWeb! II: The Sequel 36
     HelloWeb! III: The Button Strikes! 43
     HelloWeb! IV: Netscape's Revenge 55
Chapter 3
     Tools of the Trade 65
     The Java Interpreter 65
     The Class Path 68
     The Java Compiler 69
     The Netscape Alternative 71
     The Applet Tag 72
Chapter 4
     The Java Language 79
     Text Encoding 79
     Comments 80
     Types 81
     Statements and Expressions 87
     Exceptions 95
     Arrays 103
Chapter 5
     Objects in Java 111
     Classes 112
     Methods 117
     Object Creation 125
     Object Destruction 129
     Subclassing and Inheritance 130
     Packages and Compilation Units 142
     Variable and Method Visibility 145
     Interfaces 148
     The Object and Class Classes 153
Chapter 6
     Threads 159
     Introducing Threads 159
     Threading Applets 166
     Synchronization 169
     Scheduling and Priority 178
Chapter 7
     Basic Utility Classes 183
     Strings 184
     Math Utilities 193
     Dates 198
     Vectors and Hashtables 200
     Properties 206
     The Security Manager 208
Chapter 8
     Input/Output Facilities 213
     Streams 213
     Files 225
Chapter 9
     Network Programming 235
     Sockets 236
     Datagram Sockets 248
     Working with URLs 253
     Web Browsers and Handlers 257
     Writing a Content Handler 259
     Writing a Protocol Handler 267
Chapter 10
     The Abstract Windowing Toolkit 279
     GUI Concepts in Java 281
     Applets 292
     Using Components and Containers 295
     Text Components 300
     Menus and Choices 302
     Checkboxes 305
     Using a Canvas 308
     Using Scrollbars 310
     Building a New Component 314
     Dialogs 316
     Layout Managers 321
Chapter 11
     Drawing and Images 331
     Basic Drawing 331
     Fonts 337
     Images 341
     Drawing Techniques 344
     Image Processing 353
     Working with Audio 373
Glossary 375
Index 391