Please Help. Will not print from Finalize() methods.
Thank you.
package com.codegym.task.task06.task0602;
/*
Zombie cats, zombie dogs
*/
public class Cat {
public static void main(String[] args) throws Throwable {
}
protected void finalize() throws Throwable{
System.out.println("a Cat was destroyed" );
}
}
class Dog {
protected void finalize() throws Throwable{
System.out.println("a Dog was destroyed");
}
}