Concurrency problem in Thinking in Java