Respuesta :

Answer:

Creates the file with the given file name.

Explanation:

  • Here, the constructor is RandomAccessFile randomFile = new RandomAccessFile("IOData.dat", "rw");
  • The general form to construct the object of  RandomAccessFile class is RandomAccessFile randomFile = new RandomAccessFile(String Filename, String mode);
  • Here, the String Filename is the filename of the file that has to executed with the String mode.
  • The modes decide the accessibility of the file, types like  r - 'read only' the file , rw - 'read and write' the file. If the file doesn't exists it creates the file with the given filename.
  • If a file with read only mode is tried to write in the file, then it throws exceptions.
ACCESS MORE
EDU ACCESS