Google Associate Android Developer Associate-Android-Developer Exam Practice Test

Page: 1 / 14
Total 128 questions
Question 1

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)

}



Answer : A


Question 2

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



Answer : A, C


Question 3

As an example. In an Activity we have our TimerViewModel object (extended ViewModel), named mTimerViewModel. mTimerViewModel.timer method returns a LiveData value. What can be a correct way to set an observer to change UI in case if data was changed?



Answer : B


Question 4

When using an EditTexts or editable TextViews, or other editable View. What attribute to use to provide a content label for that View?



Question 5

To create a basic JUnit 4 test class, create a class that contains one or more test methods. A test method begins with the specific annotation and contains the code to exercise and verify a single functionality in the component that you want to test. What is the annotation?



Answer : D


Question 6

What method should we use with Notification.Builder to supply a PendingIntent to be sent when the notification is clicked?



Question 7

What do you want from Room when you create a DAO method and annotate it with @Update?

Example:

@Dao

interface MyDao {

@Update

fun updateUsers(vararg users: User)

}



Answer : B


Page:    1 / 14   
Total 128 questions