Android(Computer Science ) Questions and Answers

Question 1. In Which Directory XML Layout Files Are Stored
  1.    /assets
  2.    /src
  3.    /res/values
  4.    /res/layout
Explanation:-
Answer: Option D. -> /res/layout

Question 2. What does the following line of code achieve?
  1.    Starts an activity
  2.    Creates an implicit Intent.
  3.    Creates a hidden Intent.
  4.    Create an explicit Intent.
Explanation:-
Answer: Option D. -> Create an explicit Intent.

Question 3. Which of the following Android View sub-classes uses the WebKit rendering engine to display web pages?
  1.    MapView
  2.    PageView
  3.    WebView
  4.    HttpClient
Explanation:-
Answer: Option C. -> WebView

Question 4. You can create a custom view by extending class Activity
  1.    True
  2.    False
Explanation:-
Answer: Option B. -> False

Question 5. What does the
  1.    Application package
  2.    Application Program kit
  3.    Android Proprietary kit
  4.    Android Package
Explanation:-
Answer: Option A. -> Application package

Question 6. What does the src folder contain?
  1.    Image and icon files
  2.    XML resource files
  3.    Java source code files
  4.    The application manifest file
Explanation:-
Answer: Option C. -> Java source code files

Question 7. What is the difference between margin and padding in android layout?
  1.    Margin is specifying the extra space left on all four sides in layout
  2.    Padding is used to offset the content of a view by specific px or dp
  3.    Both A and B are correct
  4.    None of the above
Explanation:-
Answer: Option C. -> Both A and B are correct

Question 8. If your application is throwing exception android
  1.    Add the activity to AndroidManifest.xml
  2.    Create the activity layout
  3.    Create a new sub-class of the View class
  4.    Create a new broadcast receiver
Explanation:-
Answer: Option A. -> Add the activity to AndroidManifest.xml

Question 9. During an activity life cycle, what is the first callback method invoked by the system?
  1.    onStart()
  2.    onCreate()
  3.    onPause()
  4.    onStop()
Explanation:-
Answer: Option B. -> onCreate()

Question 10. What is AAPT?
  1.    Android Asset Processing Tool.
  2.    Android Asset Providing Tool.
  3.    Android Asset Packaging Tool
  4.    Android Asset Packaging Technique.
Explanation:-
Answer: Option C. -> Android Asset Packaging Tool