Filters
Question type

Study Flashcards

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) ;

E) A) and B)
F) All of the above

Correct Answer

verifed

verified

If a string value is undefined in a key's value, what is it set to ?


A) *
B) the number 0
C) null
D) " "

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

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

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

SharedPreferences can be used to save only int and string primitive data.

A) True
B) False

Correct Answer

verifed

verified

An undefined string value is set to a(n) ____________ value, which is represented by empty quotes. 

Correct Answer

verifed

verified

null

Which method is used to store integer data in a SharedPreferences object ?


A) place Int ()
B) saveInteger()
C) putInt()
D) storeInteger()

E) A) and B)
F) All of the above

Correct Answer

verifed

verified

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

E) B) and D)
F) A) and B)

Correct Answer

verifed

verified

With Android, yo u have th e option of storing persist e nt data only on the device's internal storage.

A) True
B) False

Correct Answer

verifed

verified

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

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

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

E) A) and D)
F) B) and D)

Correct Answer

verifed

verified

All applications can read and write files placed on external storage.

A) True
B) False

Correct Answer

verifed

verified

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

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

A(n) _______________ stores persistent data on a web server.

Correct Answer

verifed

verified

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.

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

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.

Correct Answer

verifed

verified

The following permissions are necessary in the Android Manifest file to use which type of storage?


A) internal
B) external
C) indexed
D) volatile

E) B) and D)
F) A) and D)

Correct Answer

verifed

verified

The persistent ____________________ structu re is available in some form in every programming language.

Correct Answer

verifed

verified

_____________________ stores values permanently by placing the information in a file.

Correct Answer

verifed

verified

The code to create a n instance of a SharedPreferences editor object named edit is ______________________________.

Correct Answer

verifed

verified

SharedPreferences.Editor edit = SharedPref.edit();

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) ;

E) B) and C)
F) All of the above

Correct Answer

verifed

verified

C

Showing 1 - 20 of 50

Related Exams

Show Answer