ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 71 - Associate Android Developer discussion

Report
Export

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?

A.
The value "b" would be set at first and later the main thread would override it with the value "a".
Answers
A.
The value "b" would be set at first and later the main thread would override it with the value "a".
B.
The value "a" would be set at first and later the main thread would override it with the value "b".
Answers
B.
The value "a" would be set at first and later the main thread would override it with the value "b".
C.
The value "b" would be set at first and would not be overridden with the value "a".
Answers
C.
The value "b" would be set at first and would not be overridden with the value "a".
D.
The value "a" would be set at first and would not be overridden with the value "b".
Answers
D.
The value "a" would be set at first and would not be overridden with the value "b".
Suggested answer: B
asked 18/09/2024
Alexander Voronetsky
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first