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".
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".
D) The value "a" would be set at first and would not be overridden with the value "b".
Correct Answer:
Verified
Q45: Relative positioning is one of the basic
Q46: In application theme style, flag windowNoTitle (<item
Q47: @Query is the main annotation used in
Q48: What is demonstrated by the code below?
Q49: For example, we have a BufferedReader reader,
Q51: Each time your test invokes onView() ,
Q52: A class that you create for managing
Q53: To run a debuggable build variant you
Q54: When using an ImageView, ImageButton, CheckBox, or
Q55: When using an EditTexts or editable TextViews,
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents