Does constructor new FileInputStream(someFile); invoke close() method after initialization? Need I call close() on this object after it initialization ?
Does constructor new FileInputStream(someFile); invoke close() method after initialization? Need I call close() on
Share
If you forget to do this, the file will ordinarily be closed automatically when the program terminates or when the file stream object is garbage collected, but it’s best to close a file as soon as you are done with it.