exam questions

Exam AND-401 All Questions

View all questions & answers for the AND-401 exam

Exam AND-401 topic 1 question 97 discussion

Actual exam question from AndroidATC's AND-401
Question #: 97
Topic #: 1
[All AND-401 Questions]

Which of the following is NOT true about class AsyncTask?

  • A. It must be used by sub-classing it.
  • B. It must be created on the UI thread.
  • C. Its sub-class override at least two methods: doInBackground, onPostExecute.
  • D. It uses three generic types.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
AsyncTask must be subclassed to be used. The subclass will override at least one method (doInBackground(Params...)), and most often will override a second one (onPostExecute(Result).)
Incorrect:
A: AsyncTask must be subclassed to be used.
B: AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers.
D: The three types used by an asynchronous task are the following:
Params, the type of the parameters sent to the task upon execution.
Progress, the type of the progress units published during the background computation.
Result, the type of the result of the background computation.
References:
http://developer.android.com/reference/android/os/AsyncTask.html

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Mmadi
1 year, 12 months ago
C. Its sub-class override at least two methods: doInBackground, onPostExecute.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago