May 2017
Intermediate to advanced
414 pages
13h
English
In the preceding application, we created a future that just adds two integers; here, we used the callback function, onComplete. In the onComplete function, we handled two cases, which could either be Success or failure. It handled the future asynchronously, as we see in the output that println executed before the future completed.
After you run the preceding application, you will get the following output:
Executed before callback result is 3
Read now
Unlock full access