"안녕하세요, Amigo. 몇 가지 더 할 일이 있습니다."

2
과제
Java Syntax,  레벨 6레슨 5
잠금
Cat's finalize method
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.
2
과제
Java Syntax,  레벨 6레슨 5
잠금
Zombie cats, zombie dogs
The Grim Reaper has come to CodeGym. In the previous level, we often "constructed" cats and dogs (using the constructors of the Cat and Dog classes) and created new instances of cats and dogs (objects). Now it's time to destroy objects that no one is referencing. In the Cat and Dog classes, write a finalize method, which displays text about the destruction of objects.