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? 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 ();

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 :

  t.join (); Y = s.endresult;    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -