Easy to Learn Java: Programming Articles, Examples and Tips

Start with Java in a few days with Java Lessons or Lectures


Code Examples

Java Tools

More Java Tools!

Java Forum

All Java Tips


Submit News
Search the site here...


Custom Search

[ Return to Thinking in Java 2, 3rd edition ]

Page: 1/5 

Next Page (2/5) Next Page
MindView Inc.

Thinking in Java, 3rd ed. Revision 4.0

[ Viewing Hints ] [ Book Home Page ] [ Free Newsletter ]
[ Seminars ] [ Seminars on CD ROM ] [ Consulting ]

Note: This document requires the installation of the fonts Georgia, Verdana and Andale Mono (code font) for proper viewing. These can be found at: http://sourceforge.net/project/showfiles.php?group_id=34153&release_id=105355

Modifications in Revision 4.0 (11/20/02 – Final version as will be in print)

  • Incorporated remainder of copyedits.
  • Preface and introduction completed.
  • Index completed
  • Rewrote debugging section in Chapter 15 that was still raw
  • Various corrections based on reviews

Modifications in Revision 3.0 (10/29/02)

  • Reorganized chapters into their final form and numbering. Split Chapter 1 by moving “Analysis and design” to Chapter 16.
  • Modified the description of the chapters in the introduction. (This needs to be revisited again.
  • Finished threading chapter. Dining philosophers problem added to threading chapter.
  • Edited/rewrote chapters 1 - 11, 14 and Appendix A, B & D, which went to production.
  • Added Applet Signing and Java Web Start sections to “Creating Windows and Applets.”
  • Added examples showing threading in “Creating Windows and Applets.”
  • Added improved access control to most classes (more private fields, in particular).
  • Made general improvements throughout the code base.
  • Changed cleanup( ) to dispose( )
  • Changed “friendly” to “package access”
  • Changed “function” to “method” most places
  • Added Preferences API section
  • Removed Microsoft EULA (no longer needed for CD)
  • Rewrote c14:ShowAddListeners.java to use regular expressions; refactored
  • Renamed “death condition” to “termination condition”

Modifications in Revision 2.0 (9/13/2002)

  • Completed part of the rewrite of the threading chapter. This simplifies the introduction to threading and removes all the GUI examples, so that the threading chapter may be moved to appear earlier in the book.
  • Reorganized material into reasonably final form, and assigned chapter numbers. Chapters may still migrate.
  • Finished com.bruceeckel.simpletest framework and integrated all test-instrumented examples back into the main book. Added prose for testing system in Chapter 15. Also updated most examples in book to reflect improvements in testing system. Note: we are still refactoring this code to make it simpler. Stay tuned.
  • Added sections on JDK 1.4 assertions, including design-by-contract, to Chapter 15.
  • Added JUnit introduction and example to Chapter 15.
  • Changed “static inner class” to “nested class.”
  • Modified c04:Garbage.java so it wouldn’t fail on fast machines, added description.
  • Moved BangBean2.java into the GUI chapter, since the non-GUI threading chapter will now appear before the GUI chapter.

Modifications in Revision 1.0 (7/12/2002):

  • Changed to email-based BackTalk system, which is much simpler to use and may be used while reading the document offline.
  • Added “Testing and Debugging” chapter, currently numbered 15. This includes a simple testing system and an introduction to JUnit, as well as a thorough introduction to Logging and an introduction to using debuggers and profilers.
  • Added test framework to examples in the book. Not all examples are fully tested yet, but most are at least executed. Comment flags on examples indicate the testing status of each. Significant change: program output is displayed and tested directly in the source, so readers can see what the output will actually be.
  • Change to Ant as the build tool, added package statements to disambiguate duplicate names so Ant won’t complain. Running Ant on the book not only compiles but also runs the aforementioned tests.
  • HTML is now generated by a new tool called LogicTran (http://www.Logictran.com). Still learning to use this one, so early versions will be a bit rough.
  • Replaced Thread Group section in multithreading chapter.
  • Removed JNI appendix (available in the electronic 2nd edition on the CD or via download from www.MindView.net)
  • Removed Jini section (available in the electronic 2nd edition on the CD or via download from www.MindView.net)
  • Removed Corba section (available in the electronic 2nd edition on the CD or via download from www.MindView.net) after talking to Dave Bartlett (Corba & XML expert), who observed that Corba has gone quiet and everyone has gone up a level to the use of XML for system integration instead of Corba.
  • Made a number of technical corrections suggested over the last 2 years. Most suggestions have been archived but not made yet.


  • Add “cloud of teachers, mentors, consultants” re: Larry’s suggestion
  • Check for double spaces in text, replace ( ) with ( ), correct em-dashes – with —
  • Refresh TOC page numbers and Index

Next edition:

  • A chapter on strings
  • A chapter on generics
  • Better unit testing



Third Edition
Bruce Eckel

President, MindView, Inc.


Comments from readers:

Much better than any other Java book I’ve seen. Make that “by an order of magnitude”... very complete, with excellent right-to-the-point examples and intelligent, not dumbed-down, explanations ... In contrast to many other Java books I found it to be unusually mature, consistent, intellectually honest, well-written and precise. IMHO, an ideal book for studying Java. Anatoly Vorobey, Technion University, Haifa, Israel

[ Return to Thinking in Java 2, 3rd edition ]

Top 10 read Java Articles
 Get free "1000 Java Tips eBook"

 Java Calendar and Date: good to know facts and code examples

 Array vs ArrayList vs LinkedList vs Vector: an excellent overview and examples

 How can I convert any Java Object into byte array? And byte array to file object

 The Java Lesson 1: What is Java?

 How do I compare two dates and times, date between dates, time between times and

 Maven vs Ant or Ant vs Maven?

 How to open, read, write, close file(s) in Java? Examples on move, rename and de

 Java Array

 Java: JLabel font and color

[ More in News Section ]
Java Lessons

The Java Lesson 1:
What is Java?
The Java Lesson 2:
Anatomy of a simple Java program
The Java Lesson 3:
Identifiers and primitive data types
The Java Lesson 4:
Variables, constants, and literals
The Java Lesson 5:
Arithmetic operations, conversions, and casts
The Java Lesson 6:
Boolean expressions and operations
The Java Lesson 7:
Bitwise operations
The Java Lesson 8:
Flow control with if and else
The Java Lesson 9:
switch statements
The Java Lesson 10:
for, while, and do-while statements
The Java Lesson 11:
Using break and continue
The Java Lesson 12:
Class methods and how they are called
The Java Lesson 13:
Using the Math class
The Java Lesson 14:
Creating and calling custom class methods
The Java Lesson 15:
Overloading class methods
The Java Lesson 16:
An introduction to objects and object references
The Java Lesson 17:
The String class
The Java Lesson 18:
The StringBuffer class
The Java Lesson 19:
Initializing and processing arrays of primitives
The Java Lesson 20:
Initializing and processing arrays of objects
The Java Lesson 23:
Inheritance and overriding inherited methods
The Java Lesson 24:
abstract classes and polymorphism
The Java Lesson 25:
Interfaces, instanceof, and object conversion and casting
The Java Lesson 26:
Introduction to graphical programming and the java.awt packa
The Java Lesson 27:
The Component class
The Java Lesson 28:
Containers and simple layout managers
The Java Lesson 29:
The Color and Font classes
The Java Lesson 30:
Drawing geometric shapes
The Java Lesson 31:
Choice, List, and Checkbox controls
The Java Lesson 32:
Using the Scrollbar graphical control
The Java Lesson 33:
Menus and submenus
The Java Lesson 34:
An introduction to applets and the Applet class
The Java Lesson 35:
Essential HTML to launch an applet and pass it parameters
The Java Lesson 36:
Mouse event processing
Java Lesson 37:
Menus and submenus
Java Lesson 38:
The WindowListener interface and the WindowAdapter class
Java Lesson 39:
An introduction to GridBagLayout
Java Lesson 40:
An introduction to the Java Collections API
Java Lesson 41:
Exception handling with try, catch, and finally blocks
Java Lesson 42:
Claiming and throwing exceptions
Java Lesson 43:
Multithreading, the Thread class, and the Runnable interface
Java Lesson 44:
An introduction to I/O and the File and FileDialog classes
Java Lesson 45:
Low-level and high-level stream classes
Java Lesson 46:
Using the RandomAccessFile class
Java Lessons by
Joh Huhtala: Update

Latest articles
 Java Profiler JProbe to Resolve Performance Problems Faster

 SSL with GlassFish v2, page 5

 SSL with GlassFish v2, page 4

 SSL with GlassFish v2, page 3

 SSL with GlassFish v2, page 2

 The Java Lesson 2: Anatomy of a simple Java program, page 2

 New site about Java for robots and robotics: both software and hardware.

 Exceptions -III: What's an exception and why do I care?

 Exceptions -II: What's an exception and why do I care?

 Exceptions: What's an exception and why do I care?

 Double your Java code quality in 10 minutes, here is receipt

 Murach's Java Servlets and JSP

 How to get ascii code from a char in Java?

 Can we just try without catch? Yes!

 Make Tomcat page load faster

 Make your Tomcat More secure - limit network address for certain IP addresses

 New Java book online starts now here...

 Implementing RESTful Web Services in Java

 Firefox trimming from 1 GB to 40 Mb with many tabs opened

 SSL with GlassFish v2

 My request to replublish Tech Tips

 Search JavaFAQ.nu site here

 New Advanced Installer for Java 6.0 brings XML updates and imports 3rd party MSI

 EJB programming restrictions

 Maven vs Ant or Ant vs Maven?

 Why Java does not use default value which it should?

 How to unsign signed bytes in Java - your guide is here

 The Java Lesson 3: Identifiers and primitive data types. Page 2

 The Java Lesson 7: Bitwise operations with good examples, click here! Page 4

 The Java Lesson 7: Bitwise operations with good examples, click here! Page 3

[ More in News Section ]

Home Code Examples Java Forum All Java Tips Books Submit News, Code... Search... Offshore Software Tech Doodling

RSS feed Java FAQ RSS feed Java FAQ News     

    RSS feed Java Forums RSS feed Java Forums

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.

Interactive software released under GNU GPL, Code Credits, Privacy Policy