Weekend Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ac4s65

In our TeaViewModel class, that extends ViewModel, we have such prorerty:val tea: LiveDataAn observer in...

In our TeaViewModel class, that extends ViewModel, we have such prorerty:

val tea: LiveData

An observer in our Activity (type of mViewModel variable in example is TeaViewModel) is set in this way:

mViewModel!!.tea.observe(this, Observer { tea: Tea? -> displayTea(tea) })

What will be a correct displayTea method definition?

A.

private fun displayTea()

B.

private fun displayTea(tea: Tea?)

C.

private fun displayTea(tea: LiveData?)

D.

private fun displayTea(tea: LiveData?)

Associate-Android-Developer PDF/Engine
  • Printable Format
  • Value of Money
  • 100% Pass Assurance
  • Verified Answers
  • Researched by Industry Experts
  • Based on Real Exams Scenarios
  • 100% Real Questions
buy now Associate-Android-Developer pdf
Get 65% Discount on All Products, Use Coupon: "ac4s65"