user.name: Jeff Friesen
java.home: C:\Program Files\Java\jdk1.7.0\jre
Note line.separator stores the actual line separator character/characters,
not its/their representation (such as \r\n ), which is why a blank line appears after
Applicationsexecutevia threads ,whichareindependentpathsofexecutionthroughan
application's code. When multiple threads are executing, each thread's path can differ
cases, and another thread might execute another of this statement's cases.
additional threads to perform time-intensive tasks in the background, so that they re-
main responsive to their users.
own copy of method parameters, local variables, and return value.
nable ) and four classes ( Thread , ThreadGroup , ThreadLocal , and Inher-
itableThreadLocal ) in the java.lang package. After exploring Runnable
and Thread (andmentioning ThreadGroup duringthisexploration),thissectionex-
plores thread synchronization, ThreadLocal , and InheritableThreadLocal .
Note Java 5 introduced the java.util.concurrent package as a high-level
Although java.util.concurrent isthepreferredAPIforworkingwiththreads,
you should also be somewhat familiar with Threading because it is helpful in simple