package com.javarush.task.task06.task0603; /* По 50 000 объектов Cat и Dog */ import java.sql.SQLOutput; public class Solution { static int count = 0; public static void main(String[] args) { for (int i = 0; i < 50000; i++){ new Cat(); new Dog(); count++; } System.out.println(cou); } } class Cat { @Override protected void finalize() throws Throwable { super.finalize(); System.out.println("A Cat was destroyed"); } } class Dog { @Override protected void finalize() throws Throwable { super.finalize(); System.out.println("A Dog was destroyed"); } } УРААААААААААААА!!!!!