Which method opens a private file for writing in internal storage?
- getExternalStorageDirectory()
- File("sdcard/notes.txt")
- openRawResource()
- openFileOutput("notes.txt", MODEPRIVATE)
Answer
D) openFileOutput("notes.txt", MODEPRIVATE)
openFileOutput writes to the app's private filesDir.
Computer Science MCQ · More UI Events, Views, Preferences and Data Storage MCQs · Practise