158–161 deadlocks, 157 declaring arguments, 16 collections, 99 exceptions, 23 methods, 10 packages, 39 return values, 16 deserializing objects, 137 documentation (see Javadoc) documentation comments about, 78 tags, 79 E efficiency, interfaces, 9 examples baseball statistics collections, 91–118 concurrency, 148–160 exceptions, 24–27, 29–33, 37 garbage collection, 53–55, 56–61 Javadoc, 80–88 JUnit, 167–170 JVM, 69–75 packages, 44–46 RMI, 122–138 type system, 11–16, 18 cowboy, 18 exceptions, 23–38 about, 24–27 baseball statistics example, 24–27, 29–33 defining, 46 programming practices, 33–36 RemoteException, 133 Runtime exceptions, 37–38, 98 uses of, 27–29 extending classes, 7 F fields private, public, and protected, 42 static fields, 20 File class, 72 filesystems IDEs, 48 JVM, 71 packages, 46–48 finalizers, garbage collection, 56–61 FindBugs, 170 G Gabriel, Richard, on “worse is better”, 1 garbage collection, 49–62 about, 50 other resources, 56–62 references, 51–55 generics about, 99 parameterized types, 102 H HashSet, 95 hierarchies, packages, 43 HTML, Javadoc, 79 I IDEs (integrated development environments) about, 164 documentation comments, 79 filesystem, 48 implementation documentation, 85 import statement, 41 inheritance, 7 {@inheritDoc} tag, 85 interfaces about, 8 access specifications, 43 documenting, 82 List interface, 93 namespaces, 19 RMI, 122 semantics of, 12 Set interface, 95, 100 uses of, 10, 16 using, 9 Iterator objects, 97 J Java Generics, 99 176 | Index