Understanding Threads  One of SCJP 1.4 Exam Objectives

As part of one of the Sun Certified Java Professional (SCJP) exam objectives specifically on Section 7 is the creation of threads. Section 7 covers the following items: a. Writing of codes to identify, instantiate and initiate new threads using the following: java.lang.Thread and java.lang.Runnable b. Distinguishing the conditions that may have an effect on a thread from executing. c. Writing of codes through the use of synchronized wait, notify as well as notifyAll to and to communicate between threads and protect against possible access problems from occurring. d. Defining the interaction among object locks and threads when executing the following: wait, notify and notifyAll.

In the world of Java programming, threads are considered objects. As a Sun Certified Java Professional (SCJP) aspirant, you should have an idea on how threads behave in certain conditions as defined in the Java code by extending the thread class or executing the Runnable interface. You should also know what Thread constructors are and how thread moves its way in and out of a blocked state. In addition, you should also be aware on how to use keywords such as synchronization whenever necessary. There is also such a term as interrupt. How can this affect the thread? There are three possible scenarios. If thread is in running state, there will no exceptions thrown. If the thread is in waiting or sleeping state, the thread will then move to a ready state. If the thread is in ready state, this means that nothing will happen in such a time the thread moves again to running state. Should you wish to know more about threads, you can resort to buying Java programming books or access online Java resources.