0
how to pass parameter to thread ??
2 Answers
0
You need to pass the parameter in the constructor to the thread object:
public class MyThread implements Runnable
{
public MyThread(Object parameter)
{
// store parameter for later user
}
public void run()
{
}
}
and invoke it this:
Runnable r = new MyThread(param_value);
new Thread(r).start();
0
thank you bro