Suppose I have A class body as:(It is just a rough design of a class.. )
class XYZ
{
//Some Code here
submitBTN.setOnClickListener(..){
ABC obj=new ABC();
obj.execute();
Toast(obj.result).show();
}
class ABC extends AsynTask<String,Void,String>{
String result=null;
..
..
doInBackground(..){
..
..
return "success";
}
onPostExecute(String result){
this.result=result;
}
}
}
My Question is Will Toast Show "Success" or it will show "null"; Since we are starting a another thread in background so obj.execute is a blocking statement or not i mean will the control move to the next statement after .execute statement or will it wait untill the background thread completes?