Out of curiosity,
Why is the finalize() method's access modifier is made as protected. Why cant it be public? Can someone explain me any specific reason behind this?
Also, I came to know that finalize() method is called only once. If I call it twice in my program internally, what is happening? Will the garbage collector call this again?
private void dummyCall() {
try {
finalize();
finalize();
} catch (Throwable e) {
e.printStackTrace();//NOT REACHES EXCEPTION
}
}