Free Google Associate-Android-Developer Exam Actual Questions

The questions for Associate-Android-Developer were last updated On Jan 13, 2025

Question No. 1

Select four different types of app components. (Choose four.)

Show Answer Hide Answer
Correct Answer: C, D, G, H

Question No. 2

What happens when you create a DAO method and annotate it with @Insert?

Example:

@Dao

interface MyDao {

@Insert(onConflict = OnConflictStrategy.REPLACE)

fun insertUsers(vararg users: User)

}

Show Answer Hide Answer
Correct Answer: A

Question No. 3

SharedPreferences.Editor is an interface used for modifying values in a SharedPreferences object. To mark in the editor that a preference value should be removed, which will be done in the actual preferences once commit() or apply() is called, what method in SharedPreferences.Editor should we use?

Show Answer Hide Answer
Correct Answer: B

clear() method marks in the editor to remove ALL values from the preferences. Once commit is called, the only remaining preferences will be any that you have defined in this editor.

And no delete and removeAll method exists in SharedPreferences.Editor


Question No. 4

By executing an allowMainThreadQueries() method to the room database builder

RoomDatabase.Builder, we can:

Show Answer Hide Answer
Correct Answer: D

Question No. 5

What public methods are there in android.widget.Toast.Callback? (Choose two.)

Show Answer Hide Answer
Correct Answer: B, D