Storage mechanism in Android - questions and answers
Q.1 What is/are storage option available in android?A) SharedPreferences
B) SQLiteDatabase
C) ContentProvider
D) All of the above.
View Answer / Hide AnswerQ.2 Which objects stores the data only in key-value pair?A) SharedPreferences
B) SQLiteDatabase
C) ContentProvider
D) None of the above.
View Answer / Hide AnswerQ.3 SharedPreferences stores the data in which format?A) TXT
B) XML
C) DOC
D) None of the above.
View Answer / Hide AnswerQ.4 Which objects stores only primitive data type?A) SharedPreferences
B) SQLiteDatabase
C) ContentProvider
D) None of the above.
View Answer / Hide AnswerQ.5 You want to store website name by using SharedPreferences. Choose the correct option for doing this.A) SharedPreferences obj=getSharedPreferences("MySharedFile", Context.MODE_PRIVATE);
obj.putString(“name”, “CareerRide.com”);
obj.commit();
B) SharedPreferences obj= new SharedPreferences ("MySharedFile",
Context.MODE_PRIVATE);
String n=obj.getString("name", null);
C) SharedPreferences obj=getSharedPreferences("MySharedFile", Context.MODE_PRIVATE);
Editor editor=obj.edit();
editor.putString(“name”, “CareerRide.com”);
editor.commit();
D) None of the above.
View Answer / Hide AnswerQ.6 You want to read website name by using SharedPreferences. Choose the correct option for doing this. A) SharedPreferences obj=getSharedPreferences("MySharedFile ", Context.MODE_PRIVATE);
String n=obj.getString("name", null);
B) SharedPreferences obj= new SharedPreferences ("MySharedFile", Context.MODE_PRIVATE);
String n=obj.getString("name", null);
C) String n=obj.getString("name", null);
D) None of the above.
View Answer / Hide AnswerQ.7 To write files on the external storage, which permission you will write in AndroidManifest.xml fileA) WRITE_STORAGE
B) WRITE_EXTERNAL_DATA
C) WRITE_EXTERNAL_STORAGE
D) None of the above.
View Answer / Hide AnswerQ.8 In order to use internal storage to write some data in the file, which method will be used?This method returns FileOutputStream. A) openFileInput()
B) openFileOutput()
C) openForWrite()
D) None of the above.
View Answer / Hide AnswerQ.9 To check whether the media(external storage) is available, which method of Environment class you will use?A) getExternalStorageState()
B) getExternalStorage()
C) getExternalStateData()
D) None of the above.
View Answer / Hide AnswerQ.10 If you want share the data from one application to other applications,ou will which object you will use?A) SQLiteDatabases
B) InternalStorage
C) SharedPreferences
D) ContentProvider
View Answer / Hide AnswerQ.11 Which of the following statements is correct?A) Permissions are not specified in AndroidManifest.xml.
B) The AndroidManifest.xml is optional.
C) The AndroidManifest.xml must supply a unique Application package name for your App.
D) None of the above.
View Answer / Hide AnswerQ.12 What is the full form of AVD in Android?A) Android Virtual Device
B) Android Virtual Display
C) Actual Virtual Display
D) All of the above.
View Answer / Hide AnswerQ.13 Android provides the following functionality.A) Security
B) Networking
C) Portability
D) All of the above.
View Answer / Hide AnswerQ.14 What runs in the background and does not have any user interface?A) PendingIntent
B) Service
C) Intent
D) None of the anove.
View Answer / Hide AnswerQ.15 Which one is not a nickname of android OS?A) Honeycomb
B) CupCake
C) Muffin
D) None of the above.
View Answer / Hide Answer