This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
give me solution pleeease
Posted by nada on October 21, 2001 at 5:05 PM
Hello , i have the follwoing code : class a extends Thread { a() { start() ; } public void run() {...} .... void f(int i ) { ???? } ..... void method_1(...) {.....} }//class a i need method f(int i ) to create new thread when there is any object call it then this new thread will responsible to call method_1(...) which is inside class a i try to the follwoing : void f(int i ) { new Thread(new Runnable(){ public void run() { method_1() ; }}).start() ; } but it doesn't work any body help me pleeease Nada
Replies:
|