Start reading Java threads FAQ (Code Style FAQ ebook series) on your Kindle in under a minute. Don't have a Kindle? Get your Kindle here.
This title is not currently available for purchase
Read books on your computer or other mobile devices with our FREE Kindle Reading Apps.
Java threads FAQ (Code Style FAQ ebook series)
 
 

Java threads FAQ (Code Style FAQ ebook series) [Kindle Edition]

Philip Shaw

Pricing information not available.


Product Description

Product Description

Multi thread programming is built into Java, but you need a clear view of Java thread management, synchronization and control to write thread safe programs.

The Java threads ebook explains how Thread and Runnable classes work to run threaded programs and makes sense of run(), start(), wait() and sleep() methods.


What if you were One Percent Better with Java threads?

* You're eager to write your next Runnable class
* You use threads like gift wrap for your apps
* Thread safety has meaning, the volatile keyword has purpose
* You sleep easily with thread methods, not run in fear
* You know when to synchronize, when to wait and notify


What's inside the Java threads ebook?

* 27 core Java thread questions and answers
* 10 extra Java threads answers from other FAQs


The Java threads FAQ ebook helps you solve problems like these.


Threads and runnable types

What's the difference between Thread and Runnable types?
Learn how threads and runnable classes work in multi-threaded programs.

How does the run() method in Runnable work?
Get threaded programs to carry on running with a continuous run method.

* What is a Runnable object and a Runnable argument?
* Do Thread and Runnable types have their own run() methods?
* Why not override Thread to make a Runnable?
* When could I adapt the Thread class though?


The start() method

What's the difference between a thread's start() and run() methods?
If your start() method only runs once, you need to learn how the start method works.

* Can I implement my own start() method?


Thread management methods

Which class is the sleep(long) method defined in?
Make a thread sleep and you will begin to see how thread management works.

* Which class is the wait() method defined in?
* Why are wait(), notify() and notifyall() methods defined in the Object class?
* Why are there separate wait and sleep methods?


Multi-threaded design questions

If all methods are synchronized, is a class thread safe?
The synchronized keyword is not the last word in thread safety.

Which has priority with a static synchronized thread?
Choose the right monitor object to prevent unexpected behaviour in static methods.

* Do I need to use synchronized on setValue(int)?
* How do I create a Runnable with inheritance?
* What is the volatile modifier for?
* What is the SwingUtilities.invokeLater(Runnable) method for?


Multi-threaded design patterns

What is a working thread?
Could a worker thread pool be the answer to your problem?


Thread programming jargon

What is a green thread?
Old Java books talk about green threads, see if they are relevant to your project.

* What are native operating system threads?


Thread programming problems

Apache Log4J has thrown a ThreadDeath error!
Sounds serious, but what is a thread death error and what to do?

* I get “incompatible return type” for my thread's getState() method!


Extra Java threads answers

The Java threads ebook includes 10 extra Java thread-related answers from ten other Java FAQs.

* Is the DriverManager thread safe?
* Is the Struts 1.x Action thread safe or not?
* Does JSP support multi-threading?
* How many objects exist when a JSP has concurrent requests?
* Why do we only use the main() method to start a program?
* How can I find the inherited attributes of a class?
* How can I count the number of instances of an object?
* How does the JVM execute a servlet compared with a regular Java class?
* What is the difference between Hashtable and HashMap?

Product details

  • Format: Kindle Edition
  • File Size: 138 KB
  • Simultaneous Device Usage: Unlimited
  • Publisher: One Percent Better; 1.0 edition (18 Dec 2010)
  • Language: English
  • ASIN: B004GNFVQU
  • Text-to-Speech: Enabled
  • X-Ray: Not Enabled
  • Amazon Bestsellers Rank: #541,541 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images?


More About the Author

Discover books, learn about writers, and more.

Customer Reviews

There are no customer reviews yet.
5 star
4 star
3 star
2 star
1 star

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Look for similar items by category