Coursera Answers

Programming Mobile Applications for Android Handheld Systems: Part 2 | Week 1 Quiz Answer

Programming Mobile Applications for Android Handheld Systems Part 2  Week 1 Quiz Answer



Programming Mobile Applications for Android Handheld Systems: Part 2 | Week 1 Quiz Answer 

In this article i am gone to share Programming Mobile Applications for Android Handheld Systems: Part 2 | Week 1 Practice Exercise Quiz Answer with you..


Week 1 Practice Exercise Quiz Answer



Question 1)
(True or False) Java Threads running in the same Process share dynamically-allocated memory.
  • True
  • False

Question 2)
(True or False) Once a Java Thread is created, it typically starts running as soon as the operating system can schedule it.
  • True
  • False

Question 3)
If your Activity creates its user interface hierarchy during a call to its onCreate() method, how do you know in which Thread onCreate() was called? Choose the single best answer.
  • Use LogCat to print out the Thread’s ID.
  • The onCreate() is always run in the UI thread.
  • Examine the application’s AndroidManifest.xml file.
  • Examine the application’s code to determine whether the call occurred in an application-generated Thread or in one of the system’s Threads.

Question 4)
Which of the following methods is guaranteed to run on the application’s UI Thread?
  • View.post().
  • AsyncTask.doInBackground().
  • Activity.runOnUIThread().
  • Handler.sendMessage().

Question 5)
Which of the following statements correctly capture why an application that uses a Handler, might send Messages to the Handler, rather than post Runnables to it, or vice versa?
  • Messages can take parameters. Runnables can’t.
  • Runnables are less efficient than messages.
  • Messages are used when the Handler implements the Message response.
  • Runnables are used when the Sender implements the action to be taken.


Question 6)
Android supports several HTTP clients. Which one of the following HTTP clients will be Android’s preferred HTTP client in the future? See http://android developers.blogspot.com/2011/09/androids-http-clients.html for more information.
  • URLStream
  • DefaultHttpClient
  • HttpURLConnection
  • AndroidHttpClient


Question 7)
Which of the following data formats did we discuss in these lectures?
  • JSON
  • XML
  • KML
  • Python

Question 8)
Which of the following statements are generally true about DOM parsers?
  • DOM parsers provide iterators that pull XML content into an application on demand.
  • DOM parsers tend to use more memory than the other kinds of Parsers we discussed in this lesson.
  • DOM parsers convert an XML document into a tree structure, which can make it easier to do whole document analyses.
  • DOM parsers use a streaming model in which the parser calls back into the application when specific elements are parsed.


Question 9)
The JavaScript Object Notation Language represents information using two types of data structures. Which two of the following are those data structure?
  • Bags
  • Lists
  • Trees
  • Maps