E
Edward Leibnitz
I want to find out If you can pass a declared object either final or
otherwise out of a anonymous inner class and back to the calling thread
A and B go in as a final .... how do you get C back so that you can use it
(don't concern yourself with the thread scheduling issues ...... just the
variable syntax)
public static void main(String[] args)
{
final int A = 6;
final int B = 12;
int D;
....... etc, etc ......
new Thread(new Runnable()
//anonymous inner class that runs a thread!
{
public void run()
{
C = A + B;
}
}).start();
D = A + B + C;
....... etc, etc ......
}
Any help would be appreciated!!!!
-Ed
otherwise out of a anonymous inner class and back to the calling thread
A and B go in as a final .... how do you get C back so that you can use it
(don't concern yourself with the thread scheduling issues ...... just the
variable syntax)
public static void main(String[] args)
{
final int A = 6;
final int B = 12;
int D;
....... etc, etc ......
new Thread(new Runnable()
//anonymous inner class that runs a thread!
{
public void run()
{
C = A + B;
}
}).start();
D = A + B + C;
....... etc, etc ......
}
Any help would be appreciated!!!!
-Ed