Which type is used to expose a continuously updated value from a ViewModel to the UI?

  1. Intent
  2. Bundle
  3. StateFlow (or LiveData)
  4. Cursor
Answer

C) StateFlow (or LiveData)

StateFlow holds the latest state and emits updates.

Computer Science MCQ · More Threading and Publishing Android Applications MCQs · Practise