Home Segments Top Top Previous Next

901: Sidetrip

You can use the setPriority method to tell Java about the importance of a particular thread in your application. If the thread assigned to thread is not at all important, you evaluate the following statement:

thread.setPriority(Thread.MIN_PRIORITY); 

On the other hand, if the thread is extremely important, you evaluate the following statement:

thread.setPriority(Thread.MAX_PRIORITY);