multithreading - Java j2me get result from running Thread -
hedgehog,
I know how to pass parameters in a runnab. But when my thread is running, then how to remove the result of this process? When the T is finished I want to get the 'endracebate' variable; You have to wait to finish your thread and then you can get the field value : Classes to run some tools {int p; Int endresult = 0; Public Some (Int Ultimate) {p = Ultimate; } Public Zero Run () {// Some endresult + = p; // How to know the method that will execute this method now that the result is 2; }} = Something new (1); Thread t = new thread (s); T.start ();
t.join (); Y = s.endresult;
Comments
Post a Comment