Multiple choice

Shared preferences store data as

  1. hash map

  2. key–value pair

  3. built in database

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

SharedPreferences stores data as key-value pairs internally. Under the hood, these are saved as XML files in the app's private directory, but the abstraction model is a simple key-value map, not a hash map (the internal implementation detail) or a built-in database.