Android Storage

Android_storage

15 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which data type can be stored using shared preferences?

  1. Any data type
  2. Primitive data type
  3. Advance data type
  4. Option (2) and (3)
Question 2 Multiple Choice (Single Answer)

__________ method creates only one preference file for the activity.

  1. getSharedPreferences()
  2. getPreferences()
  3. Both (1) and (2)
  4. None of these
Question 3 Multiple Choice (Single Answer)

Shared preferences can use shared data

  1. between multiple applications
  2. for single application
  3. Both (1) and (2)
  4. None of these
Question 4 Multiple Choice (Single Answer)

Android by default supports

  1. SQLDatabase
  2. SQLite database
  3. access database
  4. android database
Question 5 Multiple Choice (Single Answer)

Shared preferences store data as

  1. hash map
  2. key–value pair
  3. built in database
  4. None of these
Question 6 Multiple Choice (Single Answer)

No permission is needed to store data in

  1. shared preferences
  2. internal storage
  3. external storage
  4. Both (1) and (2)
Question 7 Multiple Choice (Single Answer)

_________ class is used to implement SQLiteDatabase in android

  1. SQLiteHelper
  2. SQLiteDatabase
  3. SQLiteOpenHelper
  4. SQLiteConnector
Question 8 Multiple Choice (Single Answer)

SQLite is ________ type of database.

  1. network
  2. object–oriented
  3. relational
  4. None of these
Question 9 Multiple Choice (Single Answer)

OpenFileInput()method returns

  1. InputStream
  2. InputStreamReader
  3. FileInputstream
  4. StreamReader
Question 10 Multiple Choice (Single Answer)

OpenFileOutput()method is used to

  1. read data from file
  2. write data to file
  3. Both (1) and (2)
  4. None of these
Question 11 Multiple Choice (Single Answer)

getExternalStorageDirectory()method returns sdcard location that

  1. is same for all devices
  2. may vary for different devices
  3. is Mnt/sdcard
  4. None of these
Question 12 Multiple Choice (Single Answer)

SQLite database needs _________ connection.

  1. JDBC
  2. ODBC
  3. network
  4. no
Question 13 Multiple Choice (Single Answer)

execSQL() method of SQLiteDatabase is used to

  1. execute query
  2. update data
  3. insert data
  4. Both (2) and (3)
Question 14 Multiple Choice (Single Answer)

SQLite is written or developed using

  1. Android
  2. Java
  3. ANSI-C
  4. None of these
Question 15 Multiple Choice (Single Answer)

Which of the following statements is/are true?

(a) File(<path>) can return directory status.
(b) File(<file name>) can return file status.

  1. Both (a) and (b)
  2. Only (a)
  3. Only (b)
  4. None of these