Official Bank 0/128

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

Last updated on June 20, 2026

97% Exam Compliance
128 Total Questions
1
Question
For example, we have a BufferedReader reader, associated with the json file through

InputStreamReader. To get a file data we can do this:
Options
A JSONObject line; try {
while ((line = reader.readJSONObject ()) != null) { builder.append(line);
}
JSONObject json = new JSONObject(builder.toString());
return json;
} catch (IOException | JSONException exception) {
exception.printStackTrace();
}
B String line; try {
while ((line = reader.readLine()) != null) { builder.append(line);
}
JSONObject json = new JSONObject(builder.toString());
return json;
} catch (IOException | JSONException exception) {
exception.printStackTrace();
}
C String line; try {
while ((line = reader.readLine()) != null) { builder.append(line);
}
JSONObject json = new JSONObject(builder.toString());
return json;
} catch (RuntimeException|ArrayIndexOutOfBoundsException exception) {
exception.printStackTrace();
}
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

2
Question
What is the incorrect statement about Data Access Object (androidx.room.Dao)?
Options
A Data Access Objects are the main classes where you define your database interactions. They can include a variety of query methods.
B An abstract @Dao class can optionally have a constructor that takes a Database as its only parameter.
C 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.
D It is recommended to have only one Dao class in your codebase for all tables.
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

3
Question
Select 3 major components of the Room. (Choose three.)
Select 3
Options
A @Database
B @Entity
C @RawQuery
D @Query
E @WorkerThread
F @DAO
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

4
Question
LiveData.postValue() and LiveData.setValue() methods have some differences. So if you have a following code executed in the main thread:
liveData.postValue("a"); liveData.setValue("b");

What will be the correct statement?
Options
A The value "a" would be set at first and would not be overridden with the value "b".
B The value "b" would be set at first and would not be overridden with the value "a".
C The value "b" would be set at first and later the main thread would override it with the value "a".
D The value "a" would be set at first and later the main thread would override it with the value "b".
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

5
Question
By adding a RoomDatabase.Callback to the room database builder RoomDatabase.Builder (method addCallback(RoomDatabase.Callback callback)), we can: (Choose two.)
Select 2
Options
A handle database opening
B handle database first time creation
C set the database factory
D disable the main thread query check for Room
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

Finish Practice?

Are you sure you want to finish? This will end your practice session.