Java OCA OCP Practice Question 447

Question

Which of the following are valid mode strings for the RandomAccessFile constructor?

Choose all that apply.

  • A. "r"
  • B. "ro"
  • C. "rw"
  • D. "rws"
  • E. "rwd"


A, C, D, E.

Note

Only "ro" is not valid.

"r" opens for reading only.

"rw" opens for reading and writing.

"rws" opens for reading and writing, with immediate updating of data and metadata changes.

"rwd" opens for reading and writing, with immediate updating of data (but not metadata) changes.




PreviousNext

Related