| >>Link: 1: Introduction to Objects \Introduction to Objects |
| >>Link: 2: Everything is an Object \Everything is an Object |
| >>Link: Execution control \Execution control |
| >>Link: Using Java operators \Using Java operators |
| >>Link: 4: Initialization & Cleanup \Initialization & Cleanup |
| Hiding the Implementation |
| >>Link: 5: Hiding the Implementation \Hiding the Implementation |
| >>Link: 6: Reusing Classes \Reusing Classes |
| >>Link: 7: Polymorphism \Polymorphism |
| Interfaces & Inner Classes |
| >>Link: 8: Interfaces & Inner Classes \Interfaces & Inner Classes |
| >>Link: C: Supplements \Supplements |
| Error Handling with Exceptions |
| >>Link: 9: Error Handling with Exceptions \Error Handling with Exceptions |
| >>Link: 10: Detecting Types \Detecting Types |
| >>Link: 11: Collections of Objects \Collections of Objects |
| >>Link: 12: The Java I/O System \The Java I/O System |
| >>Link: 13: Concurrency \Concurrency |
| Creating Windows & Applets |
| >>Link: 14: Creating Windows & Applets \Creating Windows & Applets |
| >>Link: 15: Discovering Problems \Discovering Problems |
| >>Link: 16: Analysis and Design \Analysis and Design |
| Passing & Returning Objects |
| >>Link: A: Passing & Returning Objects \Passing & Returning Objects |
| Java Programming Guidelines |
| >>Link: Page-1\Thinking in Java\Introduction to Objects |
| The progress of abstraction |
| An object has an interface |
| An object provides services |
| The hidden implementation |
| Reusing the implementation |
| Inheritance: reusing the interface |
| Is-a vs. is-like-a relationships |
| Interchangeable objects with polymorphism |
| Abstract base classes and interfaces |
| Object creation, use & lifetimes |
| >>Link: Object creation, use & lifetimes \Object creation, use & lifetimes |
| Exception handling: dealing with errors |
| >>Link: Java and the Internet \Java and the Internet |
| Maximal leverage with libraries |
| Systems are easier to express and understand |
| >>Link: 1: Introduction to Objects \Introduction to Objects \Java and the Internet |
| The Web as a giant server |
| Object creation, use & lifetimes |
| >>Link: 1: Introduction to Objects \Introduction to Objects \Object creation, use & lifetimes |
| Collections and iterators |
| The singly rooted hierarchy |
| Downcasting vs. templates/generics |
| Garbage collectors vs. efficiency and flexibility |
| >>Link: Page-1\Thinking in Java\Everything is an Object |
| You manipulate objects with references |
| You must create all the objects |
| Special case: primitive types |
| You never need to destroy an object |
| Creating new data types: class |
| Default values for primitive members |
| Methods, arguments, and return values |
| Comments and embedded documentation |
| >>Link: Comments and embedded documentation \Comments and embedded documentation |
| >>Link: Page-1\Thinking in Java\Initialization & Cleanup |
| Guaranteed initialization with the constructor |
| Calling constructors from constructors |
| Overloading on return values |
| Distinguishing overloaded methods |
| Overloading with primitives |
| Cleanup: finalization and garbage collection |
| How a garbage collector works |
| The termination condition |
| Constructor initialization |
| Non-static instance initialization |
| Explicit static initialization |
| Static data initialization |
| Specifying initialization |
| Hiding the Implementation |
| >>Link: Page-1\Thinking in Java\Hiding the Implementation |
| package: the library unit |
| Creating unique package names |
| Using imports to change behavior |
| Interface and implementation |
| private: you can’t touch that! |
| protected: inheritance access |
| >>Link: Page-1\Thinking in Java\Reusing Classes |
| Initializing the base class |
| Constructors with arguments |
| Catching base constructor exceptions |
| Combining composition and inheritance |
| Guaranteeing proper cleanup |
| Choosing composition vs. inheritance |
| Composition vs. inheritance revisited |
| Initialization and class loading |
| Initialization with inheritance |
| >>Link: Page-1\Thinking in Java\Polymorphism |
| Forgetting the object type |
| Pitfall: “overriding” private methods |
| Producing the right behavior |
| Abstract classes and methods |
| Constructors and polymorphism |
| Behavior of polymorphic methods inside constructors |
| Order of constructor calls |
| Designing with inheritance |
| Pure inheritance vs. extension |
| Downcasting and run-time type identification |
| Interfaces & Inner Classes |
| >>Link: Page-1\Thinking in Java\Interfaces & Inner Classes |
| Initializing fields in interfaces |
| “Multiple inheritance” in Java |
| Name collisions when combining interfaces |
| Extending an interface with inheritance |
| >>Link: Inner classes \Inner classes |
| Inner classes & control frameworks |
| Error Handling with Exceptions |
| >>Link: Page-1\Thinking in Java\Error Handling with Exceptions |
| Termination vs. resumption |
| Creating your own exceptions |
| The exception specification |
| The special case of RuntimeException |
| Performing cleanup with finally |
| Pitfall: the lost exception |
| Converting checked to unchecked exceptions |
| Passing exceptions to the console |
| >>Link: Page-1\Thinking in Java\Detecting Types |
| Reflection: run time class information |
| instanceof vs. Class equivalence |
| >>Link: Page-1\Thinking in Java\Collections of Objects |
| Introduction to containers |
| Container disadvantage: unknown type |
| Sometimes it works anyway |
| Making a type-conscious ArrayList |
| Making a stack from a LinkedList |
| Making a queue from a LinkedList |
| >>Link: Map functionality \Map functionality |
| Choosing an implementation |
| Sorting and searching Lists |
| Making a Collection or Map unmodifiable |
| Synchronizing a Collection or Map |
| >>Link: Java 1.0/1.1 containers \Java 1.0/1.1 containers |
| >>Link: Page-1\Thinking in Java\The Java I/O System |
| Checking for and creating directories |
| Adding attributes and useful interfaces |
| Reading from an InputStream with FilterInputStream |
| Writing to an OutputStream with FilterOutputStream |
| Multifile storage with Zip |
| Simple compression with GZIP |
| Modifying stream behavior |
| Sources and sinks of data |
| File reading & writing utilities |
| Off by itself: RandomAccessFile |
| Typical uses of I/O streams |
| >>Link: Typical uses of I/O streams \Typical uses of I/O streams |
| >>Link: New I/O \Input/Output |
| >>Link: Object serialization \Object serialization |
| >>Link: Regular expressions \Regular expressions |
| >>Link: Page-1\Thinking in Java\Concurrency |
| >>Link: Basic threads \Basic threads |
| Sharing limited resources |
| >>Link: Sharing limited resources \Sharing limited resources |
| Cooperation between threads |
| More sophisticated cooperation |
| Using Pipes for I/O between threads |
| Interrupting a blocked thread |
| Creating Windows & Applets |
| >>Link: Page-1\Thinking in Java\Creating Windows & Applets |
| >>Link: The basic applet \The basic applet |
| Running applets from the command line |
| >>Link: Controlling layout \Controlling layout |
| Using listener adapters for simplicity |
| A catalog of Swing components |
| >>Link: A catalog of Swing components \A catalog of Swing components |
| Packaging an applet into a JAR file |
| Separating business logic from UI logic |
| Binding events dynamically |
| Visual programming and JavaBeans |
| >>Link: Visual programming and JavaBeans \Visual programming and JavaBeans |
| >>Link: Page-1\Thinking in Java\Discovering Problems |
| A Simple Testing Framework |
| Improving reliability with assertions |
| Using Assertions for Design by Contract |
| >>Link: Comments and embedded documentation \Comments and embedded documentation \Some example tags \@version |
| Example: DBC + white-box unit testing |
| >>Link: Building with Ant \Building with Ant |
| >>Link: Profiling and optimizing \Profiling and optimizing |
| >>Link: Page-1\Thinking in Java\Analysis and Design |
| Phase 1: What are we making? |
| Phase 2: How will we build it? |
| Five stages of object design |
| Guidelines for object development |
| Phase 4: Iterate the use cases |
| Strategies for transition |
| Don’t rewrite existing code in Java |
| Use existing class libraries |
| Passing & Returning Objects |
| >>Link: Page-1\Thinking in Java\Passing & Returning Objects |
| Passing references around |
| >>Link: Making local copies \Making local copies |
| Why does it work in C++ and not Java? |
| The drawback to immutability |
| The String and StringBuffer classes |
| Overloading ‘+’ and the StringBuffer |
| Creating read-only classes |
| >>Link: Page-1\Thinking in Java\Supplements |
| Foundations for Java seminar-on-CD |
| Hands-On Java seminar-on-CD 3rd edition |
| Designing Objects & Systems seminar |
| Thinking in Enterprise Java |
| Thinking in Patterns (with Java) |
| Thinking in Patterns seminar |
| Design consulting and reviews |
| Comments and embedded documentation |
| >>Link: 2: Everything is an Object \Everything is an Object \Comments and embedded documentation |
| {@link package.class#member label} |
| @see: referring to other classes |
| >>Link: Page-1\Thinking in Java\Controlling Program Flow \Using Java operators |
| Aliasing during method calls |
| Unary minus and plus operators |
| Auto increment and decrement |
| Testing object equivalence |
| Common pitfalls when using operators |
| A compendium of operators |
| >>Link: Page-1\Thinking in Java\Controlling Program Flow \Execution control |
| >>Link: 8: Interfaces & Inner Classes \Interfaces & Inner Classes \Inner classes |
| Inheriting from inner classes |
| Inner classes in methods and scopes |
| Can inner classes be overridden? |
| Referring to the outer class object |
| Reaching outward from a multiply-nested class |
| Inner classes and upcasting |
| The link to the outer class |
| >>Link: 11: Collections of Objects \Collections of Objects \Arrays |
| Arrays are first-class objects |
| Array element comparisons |
| >>Link: 11: Collections of Objects \Collections of Objects \Java 1.0/1.1 containers |
| >>Link: 11: Collections of Objects \Collections of Objects \Map functionality |
| Understanding hashCode( ) |
| HashMap performance factors |
| >>Link: A: Passing & Returning Objects \Passing & Returning Objects \Making local copies |
| Adding cloneability to a class |
| Using a trick with protected |
| Implementing the Cloneable interface |
| The effect of Object.clone( ) |
| Cloning a composed object |
| A deep copy with ArrayList |
| Deep copy via serialization |
| Adding cloneability farther down a hierarchy |
| >>Link: 15: Discovering Problems \Discovering Problems \Building with Ant |
| Ant: the defacto standard |
| >>Link: 15: Discovering Problems \Discovering Problems \Logging |
| Writing your own Handlers |
| Example: Sending email to report log messages |
| Controlling Logging Levels through Namespaces |
| Logging Practices for Large Projects |
| >>Link: 15: Discovering Problems \Discovering Problems \Profiling and optimizing |
| Tracking memory consumption |
| Visual programming and JavaBeans |
| >>Link: 14: Creating Windows & Applets \Creating Windows & Applets \Visual programming and JavaBeans |
| Extracting BeanInfo with the Introspector |
| A more sophisticated Bean |
| JavaBeans and synchronization |
| More complex Bean support |
| A catalog of Swing components |
| >>Link: 14: Creating Windows & Applets \Creating Windows & Applets \A catalog of Swing components |
| Combo boxes (drop-down lists) |
| Sliders and progress bars |
| >>Link: 14: Creating Windows & Applets \Creating Windows & Applets \The basic applet |
| Running applets inside a Web browser |
| >>Link: 14: Creating Windows & Applets \Creating Windows & Applets \Controlling layout |
| >>Link: 13: Concurrency \Concurrency \Basic threads |
| Creating responsive user interfaces |
| Sharing limited resources |
| >>Link: 13: Concurrency \Concurrency \Sharing limited resources |
| Improperly accessing resources |
| A resource testing framework |
| Resolving shared resource contention |
| Synchronizing the EvenGenerator |
| >>Link: 12: The Java I/O System \The Java I/O System \Regular expressions |
| Creating regular expressions |
| Regular expressions and Java I/O |
| Is StringTokenizer needed? |
| >>Link: 12: The Java I/O System \The Java I/O System \Object serialization |
| Controlling serialization |
| An alternative to Externalizable |
| >>Link: 12: The Java I/O System \The Java I/O System \I/O |
| Locking portions of a mapped file |
| Data manipulation with buffers |
| Changing System.out to a PrintWriter |
| Reading from standard input |
| Typical uses of I/O streams |
| >>Link: 12: The Java I/O System \The Java I/O System \Typical uses of I/O streams |
| Reading and writing random access files |
| Storing and recovering data |
| |