In the lab, why does the saved username still appear after the app is closed and reopened?

  1. SharedPreferences are written to a file in the app's private storage
  2. It is stored in RAM
  3. Android remembers EditText text forever
  4. The emulator caches screens
Answer

A) SharedPreferences are written to a file in the app's private storage

The XML preferences file persists across app restarts.

Computer Science MCQ · More Lab: SharedPreferences MCQs · Practise