Spring Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

Google Developers Certification - Associate Android Developer (Kotlin and Java Exam)

Last Update 9 hours ago Total Questions : 128

The Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) content is now fully updated, with all current exam questions added 9 hours ago. Deciding to include Associate-Android-Developer practice exam questions in your study plan goes far beyond basic test preparation.

You'll find that our Associate-Android-Developer exam questions frequently feature detailed scenarios and practical problem-solving exercises that directly mirror industry challenges. Engaging with these Associate-Android-Developer sample sets allows you to effectively manage your time and pace yourself, giving you the ability to finish any Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) practice test comfortably within the allotted time.

Question # 4

RecyclerView is a subclass of ViewGroup and is a more resource-efficient way to display scrollable lists. Instead of creating a View for each item that may or may not be visible on the screen, RecyclerView:

A.

creates a single list item and reuses it for visible content.

B.

creates an unlimited number of list items and never reuses them

C.

creates a limited number of list items and reuses them for visible content.

D.

creates a single list item and never reuses it

Question # 5

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

A.

mTimerViewModel.getTimer().getValue().toString().observe(new Observer < Long > () {

@Override

public void onChanged(Long aLong) {

callAnyChangeUIMethodHere(aLong)

}

});

B.

mTimerViewModel.getTimer().observe(this, new Observer < Long > () {

@Override

public void onChanged(Long aLong) {

callAnyChangeUIMethodHere(aLong)

}

});

C.

mTimerViewModel.observe(new Observer < Long > () {

@Override

public void onChanged(Long aLong) {

callAnyChangeUIMethodHere(aLong)

}

});

Question # 6

The easiest way of adding menu items (to specify the options menu for an activity) is inflating an XML file into the Menu via MenuInflater. With menu_main.xml we can do it in this way:

A.

override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.menu_main, menu)

return true

}

B.

override fun onOptionsItemSelected(item: MenuItem): Boolean {

menuInflater.inflate(R.menu.menu_main, menu) return super.onOptionsItemSelected(item)

}

C.

override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.menu.menu_main)

}

Question # 7

The Testing Pyramid, shown in the Figure, illustrates how your app should include the three categories of tests: small, medium, and large. Small tests are unit tests that :

A.

validate your app ' s behavior one class at a time.

B.

validate either interactions between levels of the stack within a module, or interactions between related modules.

C.

validate user journeys spanning multiple modules of your app.

Question # 8

If you want to access a specific UI component in an app, use the UiSelector class. This class represents a query for specific elements in the currently displayed UI. What is correct about it? (Choose two.)

A.

If more than one matching element is found, the first matching element in the layout hierarchy is returned as the target UiObject.

B.

If no matching UI element is found, an IOException is thrown.

C.

If more than one matching element is found, the last matching element in the layout hierarchy is returned as the target UiObject.

D.

If no matching UI element is found, a UiAutomatorObjectNotFoundException is thrown.

Question # 9

The following code snippet shows an example of an Espresso test:

A.

@Rule

fun greeterSaysHello() {

onView(withId(R.id.name_field)).do(typeText( " Steve " ))

onView(withId(R.id.greet_button)).do(click())

onView(withText( " Hello Steve! " )).check(matches(isDisplayed()))

}

B.

@Test

fun greeterSaysHello() {

onView(withId(R.id.name_field)).perform(typeText( " Steve " ))

onView(withId(R.id.greet_button)).perform(click())

onView(withText( " Hello Steve! " )).check(matches(isDisplayed()))

}

C.

@Test

fun greeterSaysHello() {

onView(withId(R.id.name_field)).do(typeText( " Steve " ))

onView(withId(R.id.greet_button)).do(click())

onView(withText( " Hello Steve! " )).compare(matches(isDisplayed()))

}

Question # 10

What is the incorrect statement about Data Access Object (androidx.room.Dao)?

A.

Data Access Objects are the main classes where you define your database interactions. They can include a variety of query methods.

B.

The class marked with @Dao should either be an interface or an abstract class. At compile time, Room will

generate an implementation of this class when it is referenced by a Database.

C.

An abstract @Dao class can optionally have a constructor that takes a Database as its only parameter.

D.

It is recommended to have only one Dao class in your codebase for all tables.

Go to page: