Java Garage

Eben Hewitt

  • 出版商: Addison Wesley
  • 出版日期: 2004-08-22
  • 售價: $1,490
  • 貴賓價: 9.5$1,416
  • 語言: 英文
  • 頁數: 480
  • 裝訂: Paperback
  • ISBN: 0321246233
  • ISBN-13: 9780321246233
  • 相關分類: Java 程式語言






I do my best work in the garage.


Table of Contents:

1. What is the Java Garage.

2. Java Buzz.

3. Java Editions and Platforms.

4. Compiling and Running Java Applications.

    Installing the SDK.

    Compiling Source Code.

    Compiling into a Directory Other Than Your Source Directory.

    Running Programs.

    Setting the Classpath.

    Setting the Classpath at Compile Time.

    Setting the Path.

5. Where to Write Code.

    Integrated Development Environments.

6. Primitive Types.

    About Java Primitives.

    Integer Types.

    Real Numbers.


    Logical Representations.

7. Operators.

    Operator Precedence.

    Arithmetic Operators.

    Incrementing and Decrementing Operators.

    Relational Operators.

    Conditional Operators.

    Ternary Operator.

    Binary Numbers and Logical Operators.

    Shift Operators.

8. Control Statements.


    Switch/Case and Breaks.

    While Loop.

    Do-While Loop.

    For Loop.

    Complex For Loop.

    Nested For Loop.

    Continue and Labels.

    Enhanced For Loop (for each loop).

9. Classes.

    What Is a Class?

10. Fridge: Mmm-mmm Lamb Chops and a Manhattan.

11. Classes Reloaded.

    Using External Code in Your Programs:import.

    Constructing Objects.

    Using Enums.

    Methods Allow Variable-Length Parameter Lists.

    Wrapper Classes.


    The Class Named Class.

12. Inheritance.

    Getting Your Inheritance.

13. Strings.

    Creating String Objects.

    String References and Immutability.

    Doing Stuff with Strings.

    Character Data Encoding.

    Useful String Methods.

    Better Efficiency with StringBuffers.

14. Arrays.

    Creating Arrays.

    Using Arrays.

    Using Stacks.

    ArrayLists and toArray.

15. Documenting Your Code with Javadoc.

    Writing Javadoc Comments.

    Using Javadoc Tags.

    Using the Javadoc Tool.

    Changing Javadoc Styles.

    Generating Javadoc in Eclipse.

    Generating Javadoc with Ant.

16. Abstract Classes.

    Dude, Where's My Implementation?

    What Is an Abstract Class?

    Using Exceptions with Abstract Classes.

    Using an Abstract Class Polymorphically.

17. Interfaces.

    Some Reasons Why Interfaces Are Very Cool.

    How to Write an Interface.

    Interfaces Versus Abstract Classes.


    Interface Inheritance.

    Implementing Interfaces.

18. Casting and Type Conversions.


    Casting Between Primitives and Wrappers.

    Casting with Reference Types.

19. Inner Classes.

    Regular Inner Classes.

    Using Method Local Inner Classes.

    Using Anonymous Inner Classes.

    Static Inner Class.

20. Blog: Inner Classes and Event Handlers.

21 Handling Exceptions.


    What an Exception Is.

    Dealing with Exceptions.

    Built-in Exceptions.

    Throwing Exceptions.

    Catching Exceptions.

    Using Finally.

    Different Ways of Handling Exceptions.

    Wrapping an Exception.

    Toolkit:A Custom Exception.

    Exceptions and Inheritance.

    Exception Handling Pretty Good Practices.

22. File Input/Output.

    Files and Directories.


    File IO:Reading and Writing Stream Data.

    Readers and Writers.

23. Fridge: Guacamole.

24. Using Regular Expressions.

    Purpose of Regex.

25. Creating GUIs with Swing.

    Anatomy of a Swing App:Stuff You Typically Need to Do in Swing.

    Adding User Controls.

    User Controls.stepInto().

    Spacing and Aligning Components.



    LayoutManagers Overview.

    Switch (LAYOUT_MANAGERS) {.

    Handling Action Events.

    Creating Menus.

    A Note About Mixing Swing and AWT Components.

26. Blog Entry: Software Development Black Market.

27. Dates and Times.



28. Using Timer Tasks.

    Using TimerTask to Do Stuff at Intervals.

    Stopping a Timer Thread.

    Creating a Timer for a Swing GUI Application.

29. Applets.

    Differences Between Extending JApplet and Applet.

    Writing an Applet.

    A Few Applet Tricks.

30. Fridge: Big Daddy Flapjacks.

31. Using System and Runtime.

    Using the System.

    Forcing the Garbage Collector to Run.

    Suggesting Kindly That the Garbage Collector Run.

    Executing an External Application in Java.

    Interacting with the User.

    Toolkit: A Simple Calculator.

    Determine Number of Processors on the Current Machine.

    Determine When Your Application Is About to Exit.

    System Properties.

32. Using the Java Development Tools.

    Using Common SDK Tools.

    Discovering Other SDK Tools.

33. FAQ.

    Setting the CLASSPATH.

    Setting JAVA_HOME in Windows.

    Setting the PATH in Windows.

    Checking Current Java Version.

    Compiling and Running Programs.

    Primitive Data Types.

    Declaring and Initializing Variables.

    Class Definition.

    Package Declaration.

    Import Declaration.


    Defining and Implementing an Interface.


    Working with JARFiles.

    What Is the Java Virtual Machine?

    What's In the SDK?

34. Packaging & Deploying Java Applications.

    Herding Cats.

    Creating JARFiles with Eclipse.

    Creating an Icon for Your Java Application on Windows.

35. Toolkit.

    A Name Data Class.

    Credit Card Validator.


    Application:DrawingPad:Garage Doodler.

36. System.Exit.

    Java Glossary on Steroids.