Multiple choice technology embedded technologies

Which method is used to create and write a private file to the internal storage?

  1. getSharedPreferences()

  2. getPreferences()

  3. openFileOutput()

  4. putBoolean()

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

In Android, openFileOutput() is the standard Context method used to open and write a private file associated with the application's internal storage. getSharedPreferences() and getPreferences() access preference files, while putBoolean() writes boolean preferences.