Multiple choice

OpenFileOutput()method is used to

  1. read data from file

  2. write data to file

  3. Both (1) and (2)

  4. None of these

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

The openFileOutput() method is used to write data to a file in the app's internal storage. It returns a FileOutputStream. For reading, you would use openFileInput(). These are separate operations - openFileOutput() is specifically for writing, not reading or both.