Question
Which of the statements below are true?
Choose all that apply.
- A. When creating an instance of File, if you do not use the file-naming semantics of the local machine, the constructor will throw an IOException.
- B. When creating an instance of File, if the corresponding file does not exist on the local file system, one will be created.
- C. When an instance of File is garbage collected, the corresponding file on the local file system is deleted.
- D. None of the above.
D.
Note
A, B, and C are all false.
The File constructor doesn't check the file-naming semantics.
Construction and garbage collection of a File have no effect on the local file system.
PreviousNextRelated