I\'ve been reading through a lot of the rookie Java questions on finalize()
and find it kind of bewildering that no one has really made it plain that finalize()
The accepted answer lists that closing a resource during finalize can be done.
However this answer shows that at least in java8 with the JIT compiler, you run into unexpected issues where sometimes the finalizer is called even before you finish reading from a stream maintained by your object.
So even in that situation calling finalize would not be recommended.