MCQ King
Android Studio – 32 – AsyncTask and Threading
1 / 25
1. What is the primary purpose of threading in Android apps?
2 / 25
2. What is the main thread (UI thread) in Android development?
3 / 25
3. Why should long-running tasks be performed off the main thread?
4 / 25
4. What is AsyncTask in Android development?
5 / 25
5. What are the two main methods of AsyncTask?
6 / 25
6. Which AsyncTask method is used for background task execution?
7 / 25
7. Which AsyncTask method is used for updating the UI after a background task?
8 / 25
8. What is the purpose of onPreExecute() in AsyncTask?
9 / 25
9. What is the purpose of onPostExecute() in AsyncTask?
10 / 25
10. What is the purpose of onProgressUpdate() in AsyncTask?
11 / 25
11. Which method in AsyncTask is responsible for updating progress?
12 / 25
12. How can you execute an AsyncTask in an Android app?
13 / 25
13. What is the purpose of execute() method in AsyncTask?
14 / 25
14. What is the purpose of doInBackground() method in AsyncTask?
15 / 25
15. What is the role of onProgressUpdate() in AsyncTask?
16 / 25
16. What is the purpose of onCancelled() in AsyncTask?
17 / 25
17. How can you cancel an AsyncTask in Android?
18 / 25
18. What happens when an AsyncTask is canceled?
19 / 25
19. What is the potential issue with AsyncTask in Android?
20 / 25
20. What is the alternative to AsyncTask for background tasks in Android?
21 / 25
21. What is a Handler in Android development?
22 / 25
22. How does a Handler work in Android?
23 / 25
23. What is a Thread in Android development?
24 / 25
24. How can you create and start a new Thread in Android?
25 / 25
25. What is the main advantage of using Threads over AsyncTask?
Your score is
Restart quiz