Assume I would like to pass the following variable
String foo = "hello world";
as an argument to the following thread
new Thread(new Runnable() {
@Override
public void run() {
// SOME CODE HERE REQUIRES VARIABLE
}
}).start();
Can someone please explain how to do this.
Thanks.