Google ASSOCIATE-ANDROID-DEVELOPER Exam (page: 4)
Google Associate Android Developer
Updated on: 12-Feb-2026

An example. In our ViewModelFactory (that implements ViewModelProvider.Factory) we have an instance of our Repository, named mRepository. Our ViewModel has such constructor:

class MyViewModel(private val mRepository: MyRepository) : ViewModel() ...
Next, in our ViewModelFactory create ViewModel method (overriden) looks like this:
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
return try {
//MISSED RETURN VALUE HERE”
} catch (e: InstantiationException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: IllegalAccessException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: NoSuchMethodException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: InvocationTargetException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
}
}

What should we write instead of “//MISSED RETURN VALUE HERE”?

  1. modelClass.getConstructor()
    .newInstance(mRepository)
  2. modelClass.getConstructor(MyRepository::class.java)
    .newInstance()
  3. modelClass.getConstructor(MyRepository::class.java)
    .newInstance(mRepository)

Answer(s): C



What is demonstrated by the code below?

// RawDao.kt
@Dao
interface RawDao {
@RawQuery
fun getUserViaQuery(query: SupportSQLiteQuery?): User?
}

// Usage of RawDao
...
val query =
SimpleSQLiteQuery("SELECT * FROM User WHERE id = ? LIMIT 1",
arrayOf<Any>(sortBy))
val user = rawDao.getUserViaQuery(query)
...

  1. A method in a Dao annotated class as a raw query method where you can pass the query as a
    SupportSQLiteQuery.
  2. A method in a Dao annotated class as a query method.
  3. A method in a RoomDatabase class as a query method.

Answer(s): A



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

  1. Room generates an implementation that inserts all parameters into the database in a single transaction.
  2. Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
  3. Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.

Answer(s): A



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

  1. Room generates an implementation that inserts all parameters into the database in a single transaction.
  2. Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
  3. Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.

Answer(s): B



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

Example:
@Dao
interface MyDao {
@Delete
fun deleteUsers(vararg users: User)
}

  1. Room generates an implementation that inserts all parameters into the database in a single transaction.
  2. Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.
  3. Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.

Answer(s): C



Viewing Page 4 of 27



Share your comments for Google ASSOCIATE-ANDROID-DEVELOPER exam with other users:

adi 10/30/2023 11:51:00 PM

nice data dumps
Anonymous


EDITH NCUBE 7/25/2023 7:28:00 AM

answers are correct
SOUTH AFRICA


Raja 6/20/2023 4:38:00 AM

good explanation
UNITED STATES


BigMouthDog 1/22/2022 8:17:00 PM

hi team just want to know if there is any update version of the exam 350-401
AUSTRALIA


francesco 10/30/2023 11:08:00 AM

helpful on 2017 scrum guide
EUROPEAN UNION


Amitabha Roy 10/5/2023 3:16:00 AM

planning to attempt for the exam.
Anonymous


Prem Yadav 7/29/2023 6:20:00 AM

pleaseee upload
INDIA


Ahmed Hashi 7/6/2023 5:40:00 PM

thanks ly so i have information cia
EUROPEAN UNION


mansi 5/31/2023 7:58:00 AM

hello team, i need sap qm dumps for practice
INDIA


Jamil aljamil 12/4/2023 4:47:00 AM

it’s good but not senatios based
UNITED KINGDOM


Cath 10/10/2023 10:19:00 AM

q.119 - the correct answer is b - they are not captured in an update set as theyre data.
VIET NAM


P 1/6/2024 11:22:00 AM

good matter
Anonymous


surya 7/30/2023 2:02:00 PM

please upload c_sacp_2308
CANADA


Sasuke 7/11/2023 10:30:00 PM

please upload the dump. thanks very much !!
Anonymous


V 7/4/2023 8:57:00 AM

good questions
UNITED STATES


TTB 8/22/2023 5:30:00 AM

hi, could you please update the latest dump version
Anonymous


T 7/28/2023 9:06:00 PM

this question is keep repeat : you are developing a sales application that will contain several azure cloud services and handle different components of a transaction. different cloud services will process customer orders, billing, payment, inventory, and shipping. you need to recommend a solution to enable the cloud services to asynchronously communicate transaction information by using xml messages. what should you include in the recommendation?
NEW ZEALAND


Gurgaon 9/28/2023 4:35:00 AM

great questions
UNITED STATES


wasif 10/11/2023 2:22:00 AM

its realy good
UNITED ARAB EMIRATES


Shubhra Rathi 8/26/2023 1:12:00 PM

oracle 1z0-1059-22 dumps
Anonymous


Leo 7/29/2023 8:48:00 AM

please share me the pdf..
INDIA


AbedRabbou Alaqabna 12/18/2023 3:10:00 AM

q50: which two functions can be used by an end user when pivoting an interactive report? the correct answer is a, c because we do not have rank in the function pivoting you can check in the apex app
GREECE


Rohan Limaye 12/30/2023 8:52:00 AM

best to practice
Anonymous


Aparajeeta 10/13/2023 2:42:00 PM

so far it is good
Anonymous


Vgf 7/20/2023 3:59:00 PM

please provide me the dump
Anonymous


Deno 10/25/2023 1:14:00 AM

i failed the cisa exam today. but i have found all the questions that were on the exam to be on this site.
Anonymous


CiscoStudent 11/15/2023 5:29:00 AM

in question 272 the right answer states that an autonomous acces point is "configured and managed by the wlc" but this is not what i have learned in my ccna course. is this a mistake? i understand that lightweight aps are managed by wlc while autonomous work as standalones on the wlan.
Anonymous


pankaj 9/28/2023 4:36:00 AM

it was helpful
Anonymous


User123 10/8/2023 9:59:00 AM

good question
UNITED STATES


vinay 9/4/2023 10:23:00 AM

really nice
Anonymous


Usman 8/28/2023 10:07:00 AM

please i need dumps for isc2 cybersecuity
Anonymous


Q44 7/30/2023 11:50:00 AM

ans is coldline i think
UNITED STATES


Anuj 12/21/2023 1:30:00 PM

very helpful
Anonymous


Giri 9/13/2023 10:31:00 PM

can you please provide dumps so that it helps me more
UNITED STATES