As a convention, time proceeds downward, although nodes at the same levels do not necessarily represent situations that occur at the same times. The lengths and placements of lines and nodes have no temporal significance. Even though links do not indicate that one connected node in any sense immediately follows another, ellipses are sometimes used to highlight the fact that necessary steps have been omitted. Other informal elisions and abbreviations are used freely to suppress unnecessary detail. An interaction diagram describes the possible orderings of events.
Trace diagrams connect lines of code with dotted lines indicating their execution order.
When necessary, code is prefixed by the object performing it. For clarity, diagrams are arranged approximately in columns in which each column contains the actions performed by a different thread. For example, if the java.awt.TextArea class were not already coded to be usable in multithreaded programs, the results of ThreadedApplet might be HeGoodlbyelo , or GHoeoldlboye , or any other arbitrary mixture of the characters in the messages. The main tool for avoiding this kind of interference is the synchronized keyword, which can be applied as a qualifier to any Java method as well as to any code block within any method. The main application of synchronization is to ensure that only one thread at a time obtains access to an object.