As you might imagine, actually engineering a substantial piece of code so that we
can be sure that the state model and methods respect these properties, can be quite
an undertaking. In languages such as Java, in which programmers have direct con‐
trol over the creation of preemptively multitasked execution threads, this problem is
a great deal worse.
Figure 5-1. Program state transitions
Moving on from our introduction of object-oriented design, there is one final aspect
of the Java language and platform that needs to be understood for a sound ground‐
ing. That is the nature of memory and concurrency—one of the most complex of
the platform, but also one that rewards careful study with large dividends. It is the
subject of our next chapter and concludes the first part of this topic.