1
JavaIntermediate#serialization
finalize() was meant to run cleanup logic before an object is garbage collected, but it's unpredictable (no guaranteed timing), can hurt performance, and is deprecated since Java 9 in favor of try-with-resources and Cleaner.
// Deprecated approach:
protected void finalize() { /* cleanup */ }
// Preferred: implement AutoCloseable and use try-with-resources