Deck 11: Discover Persistent Data
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
العب
ملء الشاشة (f)
Deck 11: Discover Persistent Data
1
With Android, yo u have th e option of storing persist e nt data only on the device's internal storage.
False
2
All applications can read and write files placed on external storage.
True
3
A fter the app is terminated, what happens to the data stored within the SQLite database?
A) It erases.
B) It pauses .
C) It is transfer red to another location.
D) I t persists.
A) It erases.
B) It pauses .
C) It is transfer red to another location.
D) I t persists.
D
4
When you write data using SharedPreferences, with which SharedPreferences object can you make changes?
A) SharedPreferences Manager
B) SharedPreferences Editor
C) SharedPreferences Memory
D) SharedPreferences Status
A) SharedPreferences Manager
B) SharedPreferences Editor
C) SharedPreferences Memory
D) SharedPreferences Status
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
Before an app attempts to connect to a netwo rk connection, what action should be taken?
A) The app should scan the quality of the network.
B) The app should open a network's web browser.
C) The app should see if an Internet connection is available.
D) No action needs to be taken.
A) The app should scan the quality of the network.
B) The app should open a network's web browser.
C) The app should see if an Internet connection is available.
D) No action needs to be taken.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
A SharedPreferences object is used to store user data only as long as the application is open.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which Android tool can store data that can be used in different Activities of your application or by another application ?
A) KeyTool
B) ListPreferences
C) ListSave
D) SharedPreferences
A) KeyTool
B) ListPreferences
C) ListSave
D) SharedPreferences
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
What does the abbreviation SQL stand for?
A) Simple Quorum Language
B) Simpl e Query List
C) Structured Query Language
D) Structured Quorum List
A) Simple Quorum Language
B) Simpl e Query List
C) Structured Query Language
D) Structured Quorum List
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
SharedPreferences can be used to save only int and string primitive data.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
What is one of the most effective ways to save simple application data to an Android device?
A) internal storgage
B) SharedPreferences object
C) external storage
D) SQLite database
A) internal storgage
B) SharedPreferences object
C) external storage
D) SQLite database
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
SharedPreferences are best when your app needs to save small chunks of data.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
The persistent data structure is available in some form in every programming language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
Persistent data stores values permanently by placing the information in a file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
The SharedPreferences class stores private data as single values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
T he Shared Preferences class provides one of the easiest ways to sav e and load data. Which specific data type does this refer to ?
A) encrypted data
B) persistent data
C) application data
D) primitive data
A) encrypted data
B) persistent data
C) application data
D) primitive data
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
Android applications cannot save data for later retrieval if the application is closed .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
All applications on a device can access any files created by an app when they are saved with the internal storage method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
In a key-value pair, what is the key that uniquely identifies the preference ?
A) int
B) string
C) float
D) Boolean
A) int
B) string
C) float
D) Boolean
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
If you have a large amount of data to store as persistent data, which of the following storag e methods would be most efficient?
A) database
B) the device's internal storage
C) SD card
D) network connection
A) database
B) the device's internal storage
C) SD card
D) network connection
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
How does the Shared preferences option of storing persistent data store private data?
A) private database
B) shared external storage
C) public cloud
D) key-value pairs
A) private database
B) shared external storage
C) public cloud
D) key-value pairs
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
If a string value is undefined in a key's value, what is it set to ?
A) *
B) the number 0
C) null
D) " "
A) *
B) the number 0
C) null
D) " "
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
Which of the following correctly completes the statement b elow to instantiate a Shared Preferences object?
SharedPreferences sharedPref =
A) PreferenceManager.getDefaultSharedPreferences(this);
B) SharedPreferences.getDefault PreferenceManager (this);
C) PreferenceManager. SharedPreferences .getDefault(this);
D) SharedPreferences . PreferenceManager .getDefault(this);
SharedPreferences sharedPref =
A) PreferenceManager.getDefaultSharedPreferences(this);
B) SharedPreferences.getDefault PreferenceManager (this);
C) PreferenceManager. SharedPreferences .getDefault(this);
D) SharedPreferences . PreferenceManager .getDefault(this);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
Which type of file does t he SharedPreferences object save data to?
A) SRC
B) RES
C) XML
D) DAT
A) SRC
B) RES
C) XML
D) DAT
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
The _____________________ stores structured data in a private database.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
Data stored in ____________________ is lost when the app (or the device) stops running.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
Which statement dynamically assigns an image named car in the drawable folder to an ImageView control?
A) car.setImageResource(R.drawable.image);
B) image.setImageResource(car.R.drawable);
C) image.setImageResource(R.drawable.car);
D) SetImageResource .image( R. drawable.car);
A) car.setImageResource(R.drawable.image);
B) image.setImageResource(car.R.drawable);
C) image.setImageResource(R.drawable.car);
D) SetImageResource .image( R. drawable.car);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
What is t he maximum number of shared preferences you can create ?
A) less than 10
B) It's based on the number of apps.
C) unlimited
D) 25 or less
A) less than 10
B) It's based on the number of apps.
C) unlimited
D) 25 or less
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
________________________ stores data, which can be available to other apps on shared external storage.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
In an Android project, an ImageView control can display an image by assigning what in the XML layout file ?
A) source path
B) workspace
C) target grid
D) hashtag
A) source path
B) workspace
C) target grid
D) hashtag
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
If a numeric value is undefined in a key's value, what is it set to?
A) undefined
B) null
C) 0
D) -1
A) undefined
B) null
C) 0
D) -1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
The following permissions are necessary in the Android Manifest file to use which type of storage?
A) internal
B) external
C) indexed
D) volatile
A) internal
B) external
C) indexed
D) volatile
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
_____________________ stores values permanently by placing the information in a file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
What's the first step when writing persisten t data using a SharedPreferences file?
A) Save the values to the preferences file
B) Assign values into SharedPreferences objects
C) Create a SharedPreferences.Editor object
D) Obtain an instance of the SharedPrefe rences file
A) Save the values to the preferences file
B) Assign values into SharedPreferences objects
C) Create a SharedPreferences.Editor object
D) Obtain an instance of the SharedPrefe rences file
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
The persistent ____________________ structu re is available in some form in every programming language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
Which method is used to store integer data in a SharedPreferences object ?
A) place Int ()
B) saveInteger()
C) putInt()
D) storeInteger()
A) place Int ()
B) saveInteger()
C) putInt()
D) storeInteger()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
If data is lost when an app or the device stops running w here was the data st ored?
A) a cloud service
B) RAM
C) the device's driver
D) a memory card
A) a cloud service
B) RAM
C) the device's driver
D) a memory card
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
For Shared Preferences methods, what does the metho d return to the application if the preference is undefi ned?
A) error code
B) "undefined" string
C) -1
D) default value
A) error code
B) "undefined" string
C) -1
D) default value
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
Which method is used to retrieve a Boolean value from a SharedPreferences object?
A) getBool()
B) getBoolean()
C) readBoolean()
D) readBool()
A) getBool()
B) getBoolean()
C) readBoolean()
D) readBool()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
Which d ata type is NOT supported by the SharedPreference s class?
A) long
B) char
C) float
D) string
A) long
B) char
C) float
D) string
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
Which type of storage is used if data is saved to an SD card?
A) Internal
B) Shared preferences
C) External
D) Network connection
A) Internal
B) Shared preferences
C) External
D) Network connection
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
To write key-value pair assignments to an XML data file using a SharedPreferences editor object named edit, type ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
A(n) _______________ stores persistent data on a web server.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
The code to create a n instance of a SharedPreferences editor object named edit is ______________________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
The ______________________ method retrieves string values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
The code to store the string "Hello" into a key named " gree ting" using a SharedPreferences editor object named edit is ____________________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
The code to assign a key-value pair for a floating point value with keyname interest and variable name fl t Inter est using a SharedPreferences editor object named edit is ___________________________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
An undefined string value is set to a(n) ____________ value, which is represented by empty quotes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
Loading data saved in a SharedPreferences XML file begins by _______________ the SharedPreferences object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
The name-value pair in a SharedPreferences object is saved to a(n) ____________________ file that can be retrieved later in the app or after the app closes.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
The ______________________ method retrieves long values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck