4: ConcurrencyHomepage « Java5 Certification « 4: Concurrency
We start this section by looking at thread definition, instantiation and execution using the java.lang.Thread
and java.lang.Runnable
classes. After this we investigate the different
states in which a thread can exist, and identify ways in which a thread can transition from one state to another. We finish the section by examining Java's locking mechanisms at the class and object level and
how we can synchronize methods and blocks of code to protect static or instance variables from concurrent access problems.
Lets take a look at the points outlined at the Oracle Website for this part of the certification.
- Section 4: Concurrency
- Write code to define, instantiate, and start new threads using both
java.lang.Thread
andjava.lang.Runnable
. - Recognize the states in which a thread can exist, and identify ways in which a thread can transition from one state to another.
- Given a scenario, write code that makes appropriate use of object locking to protect static or instance variables from concurrent access problems.
- Write code to define, instantiate, and start new threads using both
4.1 Thread Creation
In our first lesson within this section we start by looking at thread definition, instantiation and execution using the java.lang.Thread
and java.lang.Runnable
classes.
4.2 Thread States
In this lesson we investigate the different states in which a thread can exist, and identify ways in which a thread can transition from one state to another.
4.3 Synchronization
We finish the section by examining Java's locking mechanisms at the class and object level and how we can synchronize methods and blocks of code to protect static or instance variables from concurrent access problems.
Related Java5 Tutorials
Concurrency - Thread Basics
Concurrency - The Runnable
Interface
Concurrency - Thread Priorities
Concurrency - Thread Communication
Concurrency - Synchronization