Answer the question
In order to leave comments, you need to log in
First, the method in the reference is executed, and then after the return, the execution of the main code continues?
How to implement first the execution of the method in the link, and then after the return (execution of the method) continue the execution of the main code?
In the called method, I need to get an int variable, then I get it in the main class through the Setter, and then I use this variable in the code in the main class method, from where I launched the method of another class.
Now the method is apparently executed in the background while the main code continues to run. Therefore, I get the default value of the variable.
In first grade:
Метод:
Второй_класс num = new Второй_класс();
num.dowload_Num();
Продолжение кода, связанного с результатом метода dowload_Num()
onPause()
, didn't help. sleep
, since the execution time of the method for the user is unknown
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question