Free AND-401 Exam Braindumps (page: 25)

Page 25 of 58

Which of the following is NOT true about class AsyncTask?

  1. It must be used by sub-classing it.
  2. It must be created on the UI thread.
  3. Its sub-class override at least two methods: doInBackground, onPostExecute.
  4. It uses three generic types.

Answer(s): C

Explanation:

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.


Reference:

http://developer.android.com/reference/android/os/AsyncTask.html



What does the following line of code do?
Toast toast = Toast.makeText(this,"Android ATC", Toast.LENGTH_LONG); toast.setGravity(Gravity.TOP|Gravity.RIGHT, 0, 0);
toast.show( );

  1. The toast will have it UI components place on the top-right corner.
  2. The toast will appear on the top-right corner.
  3. The toast will show the text message on top-right corner of the toast box.
  4. The toast will appear at the center of the screen at position (0,0), but aligned to the top-right corner.

Answer(s): B


Reference:

http://tutorials.jenkov.com/android/toast.html



Which of the following is NOT true about a content provider?

  1. It manages access to structured data.
  2. It cannot be used from inside an Activity.
  3. It facilitates access to Android’s SQLite databases.
  4. To access data in it, method getContentResolver() of the application’s Context is used.

Answer(s): B

Explanation:

You can access data in a content provider, even if you don't have the proper access permissions, by sending an intent to an application that does have the permissions and receiving back a result intent containing "URI" permissions. These are permissions for a specific content URI that last until the activity that receives them is finished.
Incorrect:
A: A content provider manages access to a central repository of data.


Reference:

http://developer.android.com/guide/topics/providers/content-provider-basics.html



Consider the following code snippet to query SQLite database:

String[] result_columns = new String[] {KEY_ID, COL1, COL2};
Cursor allRows = myDatabase.query(true, DATABASE_TABLE, result_columns,
null, null, null, null, null, null);

Which of the following prints out the values of COL1 column correctly if the result is not empty?

  1. if (allRows.moveToFirst()) {
    do {
    System.out.println(allRows.getString(1));
    }
    while (allRows.moveToNext()); }
  2. do {
    System.out.println(allRows.getString(0));
    }
    while (allRows.moveToNext());
  3. if (allRows.moveToFirst()) { do {
    System.out.println(allRows.getString(0));
    }
    while (allRows.moveToNext()); }
  4. if (allRows!= null) { do {
    System.out.println(allRows.getString(1));
    }
    while (!allRows.isNull()); }

Answer(s): A



Page 25 of 58



Post your Comments and Discuss Android AND-401 exam with other Community members:

MIGUEL AVELLANEDA commented on October 14, 2024
Real and accurate examples of the CSA exam.
Anonymous
upvote

CompTIA commented on October 14, 2024
These questions are valid but you can't rely on them. We do not use these questions no more. On god.
UNITED STATES
upvote

Faruk commented on October 14, 2024
This is valuable resource for Az-900, i think
Anonymous
upvote

Ramu commented on October 14, 2024
It helps the pattern of exam
Anonymous
upvote

Ramu commented on October 14, 2024
Good content
Anonymous
upvote

Royal commented on October 14, 2024
This exam dump is valid in my country. I passed. I received 97%.
Brazil
upvote

Rodrigo C. commented on October 14, 2024
Great to have full access to the Salesforce Associate Exam! Thank you!!!
ROMANIA
upvote

salma commented on October 14, 2024
i need the pdf pls someone help me !
Anonymous
upvote

Gunnyk commented on October 14, 2024
@Nmap_Lord22- How was the PBQ'S?
UNITED STATES
upvote

Gunnyk commented on October 14, 2024
Anyone pass the exam recently?
UNITED STATES
upvote

Saurabh commented on October 14, 2024
Good content
EUROPEAN UNION
upvote

leta commented on October 14, 2024
good learning
Anonymous
upvote

Likissa commented on October 14, 2024
Good Questions that makes me get prepared for the Actual PMP EXAM
Anonymous
upvote

Supreet commented on October 13, 2024
Hello manpreet, did all question came from dumps in exams
CANADA
upvote

Jay commented on October 13, 2024
Very helpful for certs
Anonymous
upvote

Asadullah commented on October 13, 2024
Good question but repeated of other sites!
UNITED STATES
upvote

Mish commented on October 13, 2024
Are those questions relative?
Anonymous
upvote

vaibgav commented on October 13, 2024
nice paper for practise
Anonymous
upvote

Essam Zahra commented on October 13, 2024
Thank you, it is very useful
EGYPT
upvote

Dennis Rono commented on October 13, 2024
The questions in here are fantastic, it would be nice to have some explanation on the choices of the right answer.
Anonymous
upvote

Dennis Rono commented on October 13, 2024
Awesome practice question
Anonymous
upvote

ileana commented on October 12, 2024
I can not access in this moc, is it available in other url?
Anonymous
upvote

edward commented on October 12, 2024
Passed with flying colors. Amazing material... came word by word.
Anonymous
upvote

Calisto MF Moniz commented on October 12, 2024
No comment for this form for the time being.
Anonymous
upvote

Calisto MF Moniz commented on October 12, 2024
Good mechanism for Security expertise practices!
Anonymous
upvote

Meraj commented on October 12, 2024
The exam is super duper hard. You use these exam dumps to only pass. If you don't have the questions it is not easy to pass.
INDIA
upvote

Lucas commented on October 12, 2024
Its so good.
Anonymous
upvote

Iwada commented on October 12, 2024
The answers and questions are valid. I believe this site trusted and anyone preparing for this exam needs to go the this materials.
Anonymous
upvote

Ramesh commented on October 12, 2024
All are very Good Questios
Anonymous
upvote

Sandy commented on October 12, 2024
I found this exam dumps questions and answers very helpful despite some questions do not have the complete answers. Overall it helped me pass.
Anonymous
upvote

P commented on October 11, 2024
So glad to have found this site
CANADA
upvote

Michal commented on October 11, 2024
I hope it will worth it
POLAND
upvote

Bannor commented on October 11, 2024
This exam is valid and legit. I purchased the full version last week and managed to pass. There are 2 or 3 wrong answers which I reported to the admin and they fixed it right away.
CANADA
upvote

Marko commented on October 11, 2024
Been using this website for a while now. I am a big fun as it has helped me pass 3 exams so far. I hope they can keep the site live.
EUROPEAN UNION
upvote