Professional Documents
Culture Documents
Mobile Applications Quiz 3 - Model Answer
Mobile Applications Quiz 3 - Model Answer
3- If you want share the data across the all applications, you should go for?
a) Shared Preferences
b) Content provider
c) Internal Storage
d) SQLite Databases
5- There are two statements: Statement A: Using Shared Preferences, you can store private
primitive data only. Statement B: Using External Storage option, you can store public data on
the shared external storage. Which of them are correct?
a) Statement A is False, and Statement B is False
b) Statement A is True, and Statement B is True
c) Statement A is True, and Statement B is False
d) Statement A is False, and Statement B is True
9- 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.
10- To write files on the external storage, which permission you will write in AndroidManifest.xml
file
a) WRITE_STORAGE
b) WRITE_EXTERNAL_DATA
c) WRITE_EXTERNAL_STORAGE
d) None of the above.
11- 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.
12- Which of the following class is used to share the data between android applications?
a) SharedPreferences class
b) Shared class
c) Preferences class
d) None of the above
13- Which of the following method is used to use single file for the activity and there is no need to
provide name?
a) getPreferences ()
b) getSharedPreferences ()
c) Preferences ()
d) None of the above
14- Which of the following method is used to access the number of elements of resulting query?
A. SharedPreferences ()
B. moveToNext ()
C. getCount ()
D. None of the above
15- The first step when working with SQLite is to create a class that inherits from a helper class,
what is it?
a) SQLiteOpenHelper class
b) SQLiteHelper class
c) SQLiteDatabaseHelper class
d) SQLiteDatabase class
16- How to upgrade SQLite the database from a lower version to a higher version in android
SQlite?
a) Using helper Class
b) Using cursor
c) Using intent
d) None of the above
17- Which of the following are different storage methods available in Android? 1) Shared
Preferences 2) Internal Storage 3) External Storage 4) SQLite Databases 5) Network Connection
6)Intermediate storage
a) 1,2,3,4,6
b) 2,3,4,5,6
c) 1,2,3,4,5
d) all of above