I need to implement thread.start() method in my java code. Please let me know through an example of overriding of thread.start() method and how it works?
class Worker implements Runnable{
public void run(){ if("foo"){ runFoo(); } else { runBar(); } }
private void runFoo(){ // something }
private void runBar(){ // else }
}
I'm pretty sure, you needn't to overwrite the start-Method.
By the way: Take al look at java.util.concurrent.Callable
http://download.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/Callable.html