Chapter 10. Threads and Concurrent Programming


Terms you'll need to understand:

  • Thread class

  • wait thread state

  • Daemon threads

  • sleep thread state

  • Synchronization

  • Thread priority

  • notify and notifyall methods

  • Blocked threads

  • yield thread state

Techniques you'll need to master:

  • Understanding multithreaded programming

  • Knowing how to synchronize a block of code for multiuser environments

  • Understanding the thread life cycle

  • Demonstrating how to start and stop a thread and make it sleep

  • Knowing the state of a thread

  • Knowing the difference between a single-threaded and multithreaded application

  • Determining when to implement multithreaded code

In this chapter, you review the basics of Java multithreaded functionality, which is what allows a Java program to do several things simultaneously . An example of the power behind this functionality is allowing users to click a button that saves a record to the database while displaying changing status messages.

Sun's certification assignment requires you to write a multithreaded application. This requirement isn't optional. If you don't get this part correct, it's an automatic failure.

You will need to design multithreaded functionality into the database portion of your project. In particular, you are required to allow several clients to make simultaneous requests to the database. Chapter 7, "Databases and Atomicity," describes how to do this, but the thread principles are explained in this chapter.



JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 187

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net