如何在不使变量最终的情况下访问线程外的变量?
int x=0;
Thread test = new Thread(){
public void run(){
x=10+20+20; //i can't access this variable x without making it final, and if i make it.....
//final i can't assign value to it
}
};
test.start();