Section 4: Concurrency

1 Write code to define, instantiate, and start new threads using both java.lang.Thread and java.lang.Runnable.

1.1 Use java.lang.Thread to:
1.1.1 Define a thread
1.1.2 Instantiate a thread
1.1.3 Start a new thread
1.2 Use java.lang.Runnable to:
1.2.1 Define a thread
1.2.2 Instantiate a thread
1.2.3 Start a new thread

2 Recognize the states in which a thread can exist, and identify ways in which a thread can transition from one state to another.

2.1 Thread states
2.2 Thread state transitions

3 Given a scenario, write code that makes appropriate use of object locking to protect static or instance variables from concurrent access problems.

3.1 Synchronization of static variables
3.2 Synchronization of instance variables

4 Given a scenario, write code that makes appropriate use of wait, notify, or notifyAll.

4.1 Use of wait
4.2 Use of notify
4.3 Use of notifyAll