Troubleshooting

Thread Does Not Start

My thread never starts to run.

A Thread is started by calling the start method, not the run method. Whether you are implementing the Runnable interface or extending the Thread class, you must always call the start method to start the Thread.

One Off Error

The first or last thread in a array of Threads is not starting up.

Remember that like other things in the Java language, the index for a array starts at zero, not one. As you can no doubt figure out, the last index of a array is length –1. This does not affect the actual length of the array. Ensure that if you are using an array that you are indexing it correctly.

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.