1. hubber's Avatar
    Hi guys,

    I have a android quiz(1 days time) and my friend gave me some question to work on but he forgot the answers.. I tried to refer to android developers page but not sure my answers are right... Can some guide me .. Really appreciate if someone can help me with this. Thanks!!

    Q1. Which of the following statement is TRUE? (Select one or more answers)

    1. Shared Preferences stores private primitive data in key-value pairs
    2. OnSharedPreferenceChangeListener is used to capture SharedPreference key-value changed
    3. SharedPreference.registeredOnSharedPreferenceChangeListener methode is used to initiate listener to capture change event
    4. Shared Preferences data stored is temporary. It will be cleared whenever the app is launched again

    My answer: 1 & 2

    Q2. Which of the following statement is TRUE? (Select one or more answers)
    2. SELECT _id, Firstname, Lastname FROM info ORDER BY Firstname

    1. Line 1 - A new table named "info" is created
    2. Line 1 The fields created in the table are _id, Firstname and Lastname field
    3. Line 2 Retrieve all records from info table and sort by Firstname field
    4. Line 2 To number of _id field increase automatically whenever a new record is added

    My answer: 1, 2 & 3

    Q3. Which of the following statement is TRUE? (Select one or more answers)

    1. ArrayAdapter is used to handle ArrayList
    2. CursorAdapter is used to handle database
    3. CursorAdapter use bindView() method to recycle row in LIstView
    4. ArrayAdapter uses getView() method to recycle row in ListView

    My answer: 2 & 3

    Q4. Which of the following statements is(are) TRUE? (Select one or more answers)
    Intent i = new Intent(RestaurantList.this, DetailForm.class);
    i.putExtra(ID_EXTRA, String.valueOf(id));

    1. This is an Implicit Intent
    2. Line 1 - The Intent call to RestaurantList activity
    3. Line 2 - The value of id will be passed to
    4. Line 3 Execute the DetailForm activity

    My answer: 2 & 3

    Q5. Which of the following statement is TRUE about the manifest file given below? (Select one or more answers)

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    android:versionName="1.0" >
    <uses-sdk android:minSdkVersion="10" />
    android:label="@string/app_name" >
    android:label="@string/app_name" >
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    <activity android:name=".Activity1">

    1. There are two activities in the app
    2. The app icons name is ic_launcher
    3. the app's name is "app_name"
    4. Activity1 will start when the app is first launched

    My answer: 1 & 2

    Q6. Which of the following statement is TRUE? (Select one or more answers)

    1. public void onCreate(Bundle savedInstanceState) {
    2. super.onCreate(savedInstanceState);
    3. setContentView(R.layout.main);
    4. helper = new TestAppHelper(this);
    5. prefs = PreferenceManager.getDefaultSharedPreferences(this);
    6 initList();
    7. prefs.registerOnSharedPreferenceChangeListener(prefListener);

    1. Line 3 - LoadsUI View with the layout defined by main.xml
    2. Line 4 - create a new SQLiteOpenHelper object
    3. Line 5 - get a SharedPreferences object which points to the default file that is used by the preference framework in the given activity
    4. Line 7 - activate the SharedPreferences change listener

    My answer: I have no idea
    11-24-2012 10:19 PM

Similar Threads

  1. Anyone have Need For Speed Shift? Needing help on a track!
    By tattoomikeinnc in forum Android Games
    Replies: 1
    Last Post: 07-17-2012, 04:28 PM
  2. Looking for an app... need help
    By jvm1982 in forum Verizon Galaxy Nexus
    Replies: 1
    Last Post: 03-02-2012, 06:23 PM
  3. Have to send Transformer for repairs and need help...
    By Primetimeplaya in forum ASUS EeePad Transformer
    Replies: 4
    Last Post: 09-28-2011, 09:10 AM
  4. Starting A List For After Rooting.Need Help With It.
    By Staticpunk84 in forum Inspire Rooting, ROMs, and Hacks
    Replies: 6
    Last Post: 06-02-2011, 10:01 PM
  5. return DX for SF+discount? NEED HELP!
    By BeyondAddiction in forum Motorola Droid X
    Replies: 11
    Last Post: 09-23-2010, 11:08 PM