The launch counter in the lab is updated by:
- Reading the value only
- Using commit() twice
- Creating a new file each time
- Reading the old value, adding 1 and writing it back
Answer
D) Reading the old value, adding 1 and writing it back
Read–modify–write updates the stored number.
Computer Science MCQ · More Lab: SharedPreferences MCQs · Practise