ExamGecko
Home / Google / Associate Android Developer / List of questions
Ask Question

Google Associate Android Developer Practice Test - Questions Answers, Page 5

Add to Whishlist

List of questions

Question 41

Report Export Collapse

To run a debuggable build variant you must use a build variant that includes

minifyEnabled false in the build configuration
minifyEnabled false in the build configuration
debuggable true or debuggable false in the build configuration
debuggable true or debuggable false in the build configuration
debuggable true in the build configuration
debuggable true in the build configuration
Suggested answer: C
asked 18/09/2024
Abraham Ermann
47 questions

Question 42

Report Export Collapse

About running a debuggable build variant. Usually, you can just select the default "debug" variant that's included in every Android Studio project (even though it's not visible in the build.gradle file). But if you define new build types that should be debuggable, you must add 'debuggable true' to the build type. Is that mostly true?

Yes.
Yes.
No, if you define new build types that should be debuggable, you must add 'debuggable false'
No, if you define new build types that should be debuggable, you must add 'debuggable false'
No, the debug variant should be visible in the build.gradle file anyway.
No, the debug variant should be visible in the build.gradle file anyway.
Suggested answer: A
asked 18/09/2024
Vishal Sahare
53 questions

Question 43

Report Export Collapse

With a room database. When performing queries, you'll often want your app's UI to update automatically when the data changes. Can you use a return value of type LiveData in your query method description to achieve this?

Yes
Yes
No
No
Suggested answer: A
Explanation:

Room generates all necessary code to update the LiveData when the database is updated.

asked 18/09/2024
Shaun Kilmartin
31 questions

Question 44

Report Export Collapse

As an example. Our MutableLiveData<Long> object, named mLapseTime, is not connected to a Room database, etc. How can we change the value in mLapseTime?

mLapseTime.postValue("new String")
mLapseTime.postValue("new String")
mLapseTime.setValue(1000l)
mLapseTime.setValue(1000l)
mLapseTime.changeValue(1000l)
mLapseTime.changeValue(1000l)
Suggested answer: B
asked 18/09/2024
Albaladejo Joffrey
41 questions

Question 45

Report Export Collapse

Interface for a callback to be invoked when a shared preference is changed. Interface is named:

android.content.SyncStatusObserver
android.content.SyncStatusObserver
android.content.SharedPreferences.Editor
android.content.SharedPreferences.Editor
android.content.SharedPreferences.OnSharedPreferenceChangeListener
android.content.SharedPreferences.OnSharedPreferenceChangeListener
android.content.SharedPreferences
android.content.SharedPreferences
Suggested answer: C
asked 18/09/2024
Nikolay Yankov
43 questions

Question 46

Report Export Collapse

With our Context we can get SharedPreferences with a method, named: getSharedPreferences(String name, int mode). What value can we transfer in a "mode"parameter?

MODE_PRIVATE or MODE_PUBLIC
MODE_PRIVATE or MODE_PUBLIC
combination of MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE
combination of MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE
Value is either 0 or a combination of MODE_PRIVATE, MODE_WORLD_READABLE,
Value is either 0 or a combination of MODE_PRIVATE, MODE_WORLD_READABLE,
MODE_WORLD_WRITEABLE, and MODE_MULTI_PROCESS
MODE_WORLD_WRITEABLE, and MODE_MULTI_PROCESS
Suggested answer: C
asked 18/09/2024
Arun Lailamony
47 questions

Question 47

Report Export Collapse

What statements about InputStreamReader (java.io.InputStreamReader) are correct? (Choose two.)

An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
An InputStreamReader is a bridge from character streams to byte streams: It reads characters using a specified charset and encodes them into bytes. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
An InputStreamReader is a bridge from character streams to byte streams: It reads characters using a specified charset and encodes them into bytes. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte-input stream. To enable the efficient conversion of bytes to characters, more bytes may be read ahead from the underlying stream than are necessary to satisfy the current read operation.
Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte-input stream. To enable the efficient conversion of bytes to characters, more bytes may be read ahead from the underlying stream than are necessary to satisfy the current read operation.
No any invocation of one of an InputStreamReader's read() methods can cause some bytes to be read from the underlying byte-input stream.
No any invocation of one of an InputStreamReader's read() methods can cause some bytes to be read from the underlying byte-input stream.
Suggested answer: A, C
asked 18/09/2024
Junaid Ahmed Mohammed
48 questions

Question 48

Report Export Collapse

In a class extended PreferenceFragmentCompat. What method is used to inflate the given XML resource and add the preference hierarchy to the current preference hierarchy?

findPreference
findPreference
getPreferenceManager
getPreferenceManager
addPreferencesFromResource
addPreferencesFromResource
setPreferenceScreen
setPreferenceScreen
Suggested answer: C
asked 18/09/2024
Peter Chong
41 questions

Question 49

Report Export Collapse

In a class PreferenceFragmentCompat. What method is called during onCreate(Bundle) to supply the preferences for this fragment. And where subclasses are expected to call setPreferenceScreen(PreferenceScreen) either directly or via helper methods such as addPreferencesFromResource(int)?

onCreateLayoutManager
onCreateLayoutManager
onCreatePreferences
onCreatePreferences
onCreateRecyclerView
onCreateRecyclerView
onCreateView
onCreateView
Suggested answer: B
asked 18/09/2024
Tim Dekker
47 questions

Question 50

Report Export Collapse

In a class PreferenceFragmentCompat. As a convenience, this fragment implements a click listener for any preference in the current hierarchy. So, in what overridden method we can handle that a preference in the tree rooted at this PreferenceScreen has been clicked?

onCreateLayoutManager
onCreateLayoutManager
onCreatePreferences
onCreatePreferences
onCreateRecyclerView
onCreateRecyclerView
onPreferenceTreeClick
onPreferenceTreeClick
Suggested answer: D
asked 18/09/2024
JP Brune
44 questions
Total 128 questions
Go to page: of 13
Search

Related questions