It's difficult to accidentally lose an object: as long as you have even one reference to an object, it remains alive. But if not, then the object is approached by the finalize method, an unpredictable assassin that works for the Java machine. Let's create this method ourselves: protected void finalize() throws Throwable. The last two words will become clear a little later.
Cat's finalize method
You must be signed in to leave a comment
4 January 2021, 20:10
Don't forget your curly brackets...
11 June 2020, 17:22
I think I am getting a bug. I keep getting an error on the main method, which is already provided in this exercise.
12 June 2020, 05:56
Please refer to Help section at our course.