JAVA by example

著者

書誌事項

JAVA by example

Jerry R. Jackson, Alan L. McClellan

(The SunSoft Press JAVA series)

SunSoft Press , Prentice Hall PTR, c1996

大学図書館所蔵 件 / 15

この図書・雑誌をさがす

注記

Includes index

"A Prentice Hall Title"

内容説明・目次

内容説明

This book presents Java by guiding readers through proven examples written by experts. This pragmatic, illustrative approach carries through the entire text, developing Java applets and applications, from simple to complex. By reviewing real, working code, readers learn the right way to develop Java code that is elegant, readable, and easy to maintain. The book's carefully annotated code is designed to help programmers start developing with Java immediately.

目次

I. WORKING WITH THE JAVA LANGUAGE. 1. About Java. What Is Java? Java and the World-Wide Web. The Java Compiler and the Java Interpreter. The Applet Viewer. Applications and Applets. Writing, Compiling, and Running an Application. Writing, Compiling, and Viewing an Applet. Incorporating Applets Into a Web Page. 2. Beginning With a Program. A Line Counter Program. A Closer Look at the Line Counter. Output From the Line Counter. Summary. 3. The Java Language Structure. Introduction. Classes and Methods. Instance Methods. Class Methods. The main() Method. Overriding Methods. Abstract Methods. Native Methods. Final Methods. Method Modifiers and Their Scope. Scope of a public Method. Scope of a private Method. Scope of a friendly Method. The protected Modifier. Variables. Variable Type. Variable Modifiers. Variable Scope and Extent. Instance Variables. Class Variables. Local Variables. Constants. Variables, Methods, and Superclasses. Static Initializers. Packages and the import Statement. Summary. 4. Memory and Constructors. Dynamic Allocation and Garbage Collection. The new Operator and Constructors. Using Multiple Constructors Within a Class. The Default Constructor. Using super and this in Constructors. Finalization. A Sample Program Showing Linked Lists in Java. The LongMult Class and the main() Method. The BigNum Class. The NumNode Class. The BigNumFormatException Class. Output From the Long Multiplier Program. Summary. 5. Interfaces as Types. What Is an Interface? Why Use an Interface? Using Interfaces. Extending Interfaces. A Sample Program Using Interfaces. The TreeSort Class and the main() Method. The Tree Class. The TreeNode Class. The InorderEnumeration Class. The TreeKey Interface. Sample Output From the Tree Sort Program. Summary. 6. Arrays. Basics of Java Arrays. Arrays of Objects. Multidimensional Arrays. C++ Style Array Initialization. Alternative Array Declaration Syntax. Arrays in the Object Hierarchy. Summary. 7. Exception Handling. Exceptional Conditions. Problems Using Return Codes for Error Processing. Catching and Throwing Exceptions. try and catch. The finally Statement. The throw Statement. Errors. Declaring Exceptions. Runtime Exceptions. Summary. 8. Input/Output. Introduction. Java I/O Classes and Wrappers. Standard Streams for a Java Program. Printing Text Output in Java. Reading Text Input in Java. Reading Characters. Reading an Array of Bytes. Output of the CopyFile Program. Reading Text a Line at a Time. Output of the CopyTextFile Program. Reading a Token at a Time. Output of the TokenizerText Program. File Input and Output in Java. Output of the AppendTextFile Program. Data Input and Output in Java. Summary. 9. Runtime Typing and Extensibility. Introduction. Variable Types and Their Values. The instanceof Operator. Type Casting. Class Loading at Runtime. Class Loaders. Linking With C Code. Declaring Native Methods. Generating Include Files. Generating Stub Functions. Building a Library. Linking a Library Into Java. Examples. Using Native Methods, Example 1. Using Native Methods, Example 2. Using Native Methods, Example 3. Summary. 10. Multiple Threads of Execution. Introduction. Creating Threads. Extending the Thread Class. Implementing the Runnable Interface. Resource Locking. Using the synchronized Modifier. Using synchronized Blocks. Summary. 11. Putting the Pieces Together. Four-Function Calculator. The Calculator main() Method. The Calculator Class. The Reader Class. The ExitException Class. The Displayable Interface. The Processable Interface. The ProcessableCharacter Class. The ProcessableDouble Class. The CalcStack Class. The CalcStackItem Interface. Output From the Calculator Program. Summary. II. WRITING JAVA APPLETS. 12. Introduction to Applets. Introduction. Java's Applet Tools and Class Support. Displaying Applet Output. A Simple Applet. Configurable Applets. Displaying a Static Label. Output From the Static Label Applet. Incorporating Images and Sound. Output From the ImageWithSound Applet. Active Applets. Displaying a Flashing Label. Output From the Flashing Label Applet. Summary. 13. Events and Threads in Applets. Introduction. Simple Event Handling. Puzzle Applet. Output From the Puzzle Applet. Managing Events and Threads. Memory Game Applet. Output From the Memory Game Applet. Summary. 14. Forms in Applets. Introduction. Containers. Layout Managers. A Forms-based Applet. Output from the Occupational Oracle Applet. Summary. 15. Animation in Applets. Incorporating Animation. A Ticker-tape Applet. Output From the Ticker-tape Applet. The Animator Class. Summary. 16. Putting the Pieces Together. Introduction. Constructing the Cellular Applet. Applet Overview. Operation of the Applet. Use of synchronized in the Applet. A Custom Layout Manager. Defining Rules. Scripting the Applet. Applet Class Structure. The Cellular Applet. The Cellular Class. The CellCanvas Class. The RuleTextField Class. The CellValue Class. The Pattern Class. The BoardLayout Class. The Arena Class. The Rules Class. Summary. III. APPENDIXES. Appendix A. Object- Oriented Programming. Overview. Classes. Instances. Inheritance. Encapsulation. Overloading. Polymorphism. Appendix B. Quick Reference. Java for C Programmers. Java for C++ Programmers. Data Types. Operators. Control Flow and Iteration. Comments. Keywords. The Java Classes and Interfaces. The java.applet Package. The java.awt Package. The java.io Package. The java.lang Package. The java.net Package. The java.util Package. The HTML applet and param Tags. Appendix C. The SunSoft Press Java Series CD-ROM. Index.

「Nielsen BookData」 より

関連文献: 1件中  1-1を表示

詳細情報

ページトップへ