Answer the question
In order to leave comments, you need to log in
Why does the finalize() method throw an error?
class gomel {
int x;
gomel (int i) {
x = i;
}
protected void finalize() {
System.out.println("Финализация " + x);
}
void generator(int i) {
gomel o = new gomel(i);
}
}
public class giblar {
public static void main(String[] args) {
int count;
gomel ob = new gomel(0);
for(count = 1; count < 100000; count ++) {
ob.generator(count);
}
}
}
Answer the question
In order to leave comments, you need to log in
Because finalize has been deprecated for a very long time, deprecated and will someday be completely removed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question