Multiple choice

Which of the following methods of File class removes the file associated with the invoking object, when the Java Virtual Machine terminates?

  1. isHidden()

  2. deleteOnExit()

  3. setReadOnly()

  4. accept()

  5. listFiles()

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

This method of File class removes the file associated with the invoking object, when the Java Virtual Machine terminates