** Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ public class DriverClass extends SomeClass { ... public void startAThread() { // Create a Thread object. ThreadClass thread = new ThreadClass(); // Start it in a separate process. thread.start(); ... } }
Driver template to create and start a Thread object.
Permanent link to this article: http://bangla.sitestree.com/driver-template-to-create-and-start-a-thread-object/