🎴 Flashcard Mode

Android Storage

Card1 / 15
Mastered0
Review0
QuestionClick to flip

Which data type can be stored using shared preferences?

AnswerClick to flip back
A
Primitive data type
💡 Explanation:

SharedPreferences in Android stores key-value pairs where values must be primitive data types: boolean, float, int, long, and String (or Set). Complex objects like custom classes cannot be directly stored - they must be serialized to primitives first.

Change Mode